Skip to content

Conversation

@immrsd
Copy link
Contributor

@immrsd immrsd commented Jan 6, 2026

Key Changes

  • Aggregates changes to update Cairo-stable from v2.0.0 tot v3.0.0
  • Supports v3.0.0 audit fixes in both Cairo-stable and Cairo-alpha
  • Updates Cairo-alpha version to 3.0.0 to hide the switch UI element for Cairo tab
  • Supports the changes in AI definitions and MCP

@immrsd immrsd requested review from ericglau and ericnordelo January 6, 2026 18:19
@immrsd immrsd self-assigned this Jan 6, 2026
@immrsd immrsd requested review from a team as code owners January 6, 2026 18:19
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request upgrades OpenZeppelin Contracts for Cairo from v2.x to v3.0.0, introducing a new with_components macro feature and redesigned access control with default admin rules (DAR). Changes include updating component module paths, adding macros configuration throughout the generation pipeline, refactoring access control with new AccessControlDefaultAdminRules, bumping versions, and adding comprehensive test coverage for both macro-enabled and macro-disabled configurations.

Changes

Cohort / File(s) Summary
Workflow Updates
.github/workflows/compile-cairo-alpha-project.yml, .github/workflows/compile-cairo-project.yml
Adds scarb clean commands and restructures nested loops to iterate over macros, access, and royalty combinations; updates project naming and invocation flags for multi-parameter generation.
Version & Manifest
packages/core/cairo/package.json, packages/core/cairo/CHANGELOG.md, packages/core/cairo/README.md, packages/core/cairo/ava.config.js, packages/core/cairo/test_project/Scarb.toml, packages/core/cairo/src/utils/version.ts
Bumps version 2.1.0 → 3.0.0, updates Cairo/Scarb versions to 2.13.1, adds OpenZeppelin v3.x dependencies with granular crates, updates compatibility notes from ^2.0.0 → ^3.0.0.
Core Type Updates
packages/common/src/ai/descriptions/cairo.ts, packages/core/cairo/src/contract.ts, packages/core/cairo/src/common-options.ts
Renames cairoAlphaAccessDescriptionscairoAccessDescriptions, adds darMaxTransferDelay description, makes Impl.embed required (boolean instead of optional), adds macros: MacrosOptions to options interfaces.
Component Path Migration
packages/core/cairo/src/account.ts, packages/core/cairo/src/add-pausable.ts, packages/core/cairo/src/common-components.ts, packages/core/cairo/src/erc20.ts, packages/core/cairo/src/erc721.ts, packages/core/cairo/src/erc1155.ts, packages/core/cairo/src/multisig.ts, packages/core/cairo/src/vesting.ts, packages/core/cairo/src/set-upgradeable.ts
Updates component paths from openzeppelin::* to openzeppelin_* (underscore-based), adds embed: true to implementation definitions, threads macros through ContractBuilder constructor.
Access Control Redesign
packages/core/cairo/src/set-access-control.ts, packages/core/cairo/src/set-royalty-info.ts
Introduces AccessControlDefaultAdminRules with delay configurations (darInitialDelay, darDefaultDelayIncrease, darMaxTransferDelay), adds AccessControl factory (.None(), .Ownable(), .Roles(), .RolesDefaultAdminRules(opts)), updates access parameter handling and adds 'roles-dar' branch.
Macros Configuration
packages/core/cairo/src/set-macros.ts, packages/core/cairo/src/index.ts
Introduces new MacrosOptions type (withComponents: boolean), MacrosSubset enum ('all', 'none', 'with_components'), and resolveMacrosOptions() resolver; exports macrosDefaults.
Generator Updates
packages/core/cairo/src/generate/account.ts, packages/core/cairo/src/generate/custom.ts, packages/core/cairo/src/generate/erc20.ts, packages/core/cairo/src/generate/erc721.ts, packages/core/cairo/src/generate/erc1155.ts, packages/core/cairo/src/generate/governor.ts, packages/core/cairo/src/generate/multisig.ts, packages/core/cairo/src/generate/vesting.ts, packages/core/cairo/src/generate/sources.ts
Adds macros and access parameters to generator functions, creates prepareBlueprint() helpers to resolve options dynamically, updates signatures to accept GeneratorOptions with new fields.
Governor Overhaul
packages/core/cairo/src/governor.ts
Updates component paths to openzeppelin_governance, changes storage names (e.g., governor_countinggovernor_counting_simple), adds embed flags, replaces durationToTimestamp with durationToSeconds.
Utility Updates
packages/core/cairo/src/utils/duration.ts
Renames durationToTimestampdurationToSeconds.
Print & Script Updates
packages/core/cairo/src/print.ts, packages/core/cairo/src/scripts/update-scarb-project.ts
Adds printWithComponentsDirective() for #[with_components(...)] emission, refactors component/storage/events printing based on withComponents flag; extends update-scarb-project.ts with CLI parsing for macros/access, new subset resolvers, and updated Scarb.toml generation.
Test Files with_components_off
packages/core/cairo/src/tests/with_components_off/*/\*.test.ts
Updates imports to reference higher-level modules, replaces string-literal access values with AccessControl factory calls, adds test cases for DAR (default/custom opts), updates snapshots for Cairo 3.x paths and storage field names.
Test Files with_components_on (New)
packages/core/cairo/src/tests/with_components_on/*/\*.test.ts (account, custom, erc20, erc721, erc1155, governor, multisig, vesting)
Introduces new test suites validating contract generation with with_components enabled; includes helpers (testERC20, testAPIEquivalence, etc.) and comprehensive snapshot coverage for all contract types with macros enabled.
Test Snapshots
packages/core/cairo/src/tests/with_components_off/*/\*.test.ts.md, packages/core/cairo/src/tests/with_components_on/*/\*.test.ts.md
Updates existing snapshots to Cairo 3.x crate paths, new storage field names (e.g., accesscontrolaccess_control), AccessControlDefaultAdminRulesComponent variants, constructor parameter changes; adds new snapshots for with_components_on scenarios.
UI Components
packages/ui/src/cairo/AccessControlSection.svelte, packages/ui/src/cairo/\*Controls.svelte (Account, Custom, ERC20, ERC721, ERC1155, Governor, Multisig, Vesting)
Replaces access: Access prop with accessType: AccessType and adds granular props (darInitialDelay, darDefaultDelayIncrease, darMaxTransferDelay, errors), adds new MacrosSection component binding and rendering, updates documentation links from 2.x to 3.x.
New UI Component
packages/ui/src/cairo/MacrosSection.svelte
Introduces new Svelte component exposing macros: MacrosOptions prop with checkbox UI for withComponents flag.
AI Function Definitions
packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts, packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts, packages/ui/api/ai-assistant/function-definitions/cairo.ts
Adds macros property to shared function definition, restructures access from simple anyOf to detailed object with type and DAR fields, replaces static descriptions with dynamic prompts from cairoPrompts, adds macros to function property lists.

Sequence Diagram(s)

sequenceDiagram
    participant User as UI User
    participant UICtrl as Control Component
    participant Builder as buildERC20()
    participant Contract as ContractBuilder
    participant Print as printContract()

    User->>UICtrl: Configure (access, macros, options)
    activate UICtrl
    UICtrl->>UICtrl: Collect accessType, DAR fields, macros
    Note over UICtrl: AccessControlSection + MacrosSection
    
    UICtrl->>Builder: buildERC20({...opts, access, macros})
    deactivate UICtrl
    activate Builder
    Builder->>Contract: new ContractBuilder(name, macros)
    activate Contract
    Contract->>Contract: Store macros (withComponents)
    Contract->>Contract: addComponent(access.type==='roles-dar'?)
    Note over Contract: Skip use clause if withComponents enabled
    deactivate Contract
    Builder->>Builder: setAccessControl(access.type, darOpts?)
    Note over Builder: Handle 'roles-dar' → AccessControlDefaultAdminRulesComponent
    deactivate Builder
    
    User->>Print: print(contract)
    activate Print
    Print->>Print: withComponents enabled?
    alt with_components ON
        Print->>Print: Emit #[with_components(...)] directive
        Print->>Print: Skip component! declarations
        Print->>Print: Filter impls by embed=true
    else with_components OFF
        Print->>Print: Emit component! declarations
        Print->>Print: Include component storage
    end
    Print-->>User: Rendered contract source
    deactivate Print
Loading

The diagram illustrates the new flow where macros configuration and granular access control options (including DAR) flow through the UI controls, are passed to the builder, and influence both component wiring and code generation output.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • PR #698: Introduces the AccessControlDefaultAdminRules (roles-dar) feature and new Access/AccessType/RolesDefaultAdminRulesOptions types directly paralleling the access control redesign in this PR.
  • PR #703: Implements the with_components macro feature surface (new set-macros module, threading MacrosOptions through builders/generators), which is a core mechanic in this PR.
  • PR #638: Modifies the update-scarb-project.ts script for multi-parameter generation in Cairo workflows, foundational to the workflow restructuring here.

Suggested reviewers

  • ericnordelo
  • ericglau

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.52% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No description was provided by the author. While the PR has significant changes across multiple files and features, the lack of any description means it cannot be evaluated as related to the changeset. Add a pull request description explaining the changes, such as: version upgrade details, breaking changes, new features (macros support, access control enhancements), and testing updates.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Cairo: support v3.0.0' directly reflects the main change: updating the entire Cairo codebase to support version 3.0.0 of OpenZeppelin Contracts for Cairo, including dependency updates, module path changes, and new features.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/compile-cairo-alpha-project.yml (2)

72-84: --macros flag not passed for ERC20/Custom despite outer loop.

The outer loop iterates over macros_option, but line 76 doesn't pass --macros=$macros_option. This causes ERC20 and Custom to be tested twice with identical configurations.

Either pass the flag:

-                  yarn run update_scarb_project --kind=$kind --access=$access_option
+                  yarn run update_scarb_project --kind=$kind --macros=$macros_option --access=$access_option

Or, if macros only applies to ERC721/ERC1155, restructure the loop to avoid duplicate runs.


86-98: --macros flag not passed for other kinds either.

Same issue as ERC20/Custom: line 90 doesn't pass --macros=$macros_option, causing Account, Multisig, Governor, and Vesting to each be tested twice with identical configurations.

🤖 Fix all issues with AI Agents
In @.github/workflows/compile-cairo-project.yml:
- Around line 86-98: proj_name and the scarb/project invocation omit the macros
option for non-default kinds; update the else branch so proj_name includes the
macros_option (e.g., proj_name="'$kind' ($macros_option) test project") and pass
the macros option into the project generator and build commands — add
--macros=$macros_option to the yarn run update_scarb_project invocation (yarn
run update_scarb_project --kind=$kind --macros=$macros_option) and ensure any
subsequent scarb or build steps that require macros receive the same --macros
flag.
- Around line 72-84: In the ERC20/Custom block inside the loop over
macros_option and access_option, include the macros flag and label so each run
reflects the selected macros: update the proj_name construction (currently
proj_name="'$kind, access: $access_option' test project") to include
macros_option (e.g., include "macros: $macros_option") and pass the macros
option to the updater by changing the yarn invocation update_scarb_project to
include --macros=$macros_option (keep existing --kind and --access flags).
Ensure the echoed "Generating" and any subsequent messages reflect the macros
value so duplicate runs are distinguishable.

In @packages/core/cairo/src/contract.ts:
- Line 51: Multiple component Impl definitions are missing the newly required
embed boolean; update each Impl object to include embed: true or embed: false as
appropriate. Specifically, add the embed field to VestingImpl, ERC2981Impl,
UpgradeableInternalImpl, OwnableMixinImpl, AccessControlInternalImpl,
AccessControlDefaultAdminRulesInternalImpl, MultisigImpl, the ERC20 Impl, and
FooImpl in the test, ensuring each Impl declaration (the object assigned to
those names) explicitly sets embed to the correct boolean value consistent with
how the component should be embedded.

In @packages/core/cairo/src/test.ts:
- Line 61: The temporary directory name is incorrect for the stable cairo
package; update the path string used when constructing generatedSourcesPath (the
path.join(os.tmpdir(), 'oz-wizard-cairo-alpha') call) to the stable package name
(e.g., 'oz-wizard-cairo') so generatedSourcesPath points to the correct sandbox
for packages/core/cairo.

In @packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts:
- Around line 28-34: testAPIEquivalence is mutating the shared defaults by
writing to options.macros when opts is undefined; instead, create a new options
object that clones defaults before setting macros (e.g., shallow copy via spread
or Object.assign) so assigning options.macros = withComponentsMacroON does not
change the original defaults; update the function to use the cloned object when
opts is undefined and leave opts usage unchanged when provided.

In @packages/core/cairo/src/utils/version.ts:
- Line 4: The exported constant contractsVersion currently reads '3.0.0' but
that tag doesn't exist as a stable OpenZeppelin Contracts release; update the
value of contractsVersion to an actual release tag (e.g., '3.0.0-alpha.3' to
match the cairo_alpha package or a real stable version if one is chosen) so the
code references a valid OpenZeppelin Contracts tag.
🧹 Nitpick comments (14)
packages/core/cairo/src/generate/custom.ts (1)

1-31: LGTM - Clean refactoring with improved separation of concerns.

The introduction of GeneratorOptions type and prepareBlueprint helper cleanly separates option resolution from blueprint generation. The explicit calls to resolveAccessControlOptions and resolveMacrosOptions make the configuration flow more transparent and maintainable.

If GeneratorOptions is reused across other generators (ERC20, ERC721, etc.), consider extracting it to a shared types file for consistency across the codebase.

packages/core/cairo/src/set-access-control.ts (1)

281-321: Factor shared duration‑parsing / error‑wrapping logic (optional)

getInitialDelay, getDefaultAdminDelayIncreaseWait, and getDefaultAdminMaxTransferDelay all duplicate the same try { durationToSeconds(...) } catch (e) { new OptionsError({ ... }) } pattern, differing only in the field key. You could consider a small internal helper like durationOptionToSeconds(key, value) to centralize this and make it harder to introduce inconsistencies if fields change in the future.

packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md (1)

865-880: Replace hard tabs in code blocks to satisfy markdownlint (MD010)

markdownlint is flagging no-hard-tabs in several use ... { ... } blocks where inner items are indented with tab characters. To quiet MD010 for this file, replace those tab characters with spaces in the affected code blocks (e.g., around the multi‑line use ...::{ DefaultConfig as ..., ... } statements).

Also applies to: 1193-1197, 1401-1408, 1520-1521, 1845-1848, 2087-2088, 2613-2615

packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md (1)

61-61: Fix hard tabs in snapshots to clear markdownlint MD010

This markdown file still contains tab characters in several code blocks (e.g., within multi‑line use ...::{ ... } imports), which triggers markdownlint’s MD010 (no-hard-tabs) warnings. Converting those tab characters to spaces in the indicated locations should resolve the linter failures without changing the generated Cairo semantics.

Also applies to: 134-135, 452-454, 828-829, 903-904, 1051-1052, 1138-1138, 1237-1244, 1346-1347, 2264-2265

packages/core/cairo/src/tests/with_components_on/erc1155/erc1155.test.ts (1)

39-45: Consider avoiding direct mutation of options object.

Line 41 mutates the options object, which could either be the passed opts parameter or the shared defaults object. This mutation could lead to unexpected side effects if defaults is reused elsewhere or if callers don't expect their options to be modified.

🔎 Proposed fix
 function testAPIEquivalence(title: string, opts?: ERC1155Options) {
-  const options = opts === undefined ? defaults : opts;
-  options.macros = withComponentsMacroON;
+  const options = {
+    ...(opts === undefined ? defaults : opts),
+    macros: withComponentsMacroON,
+  };
   test(title, t => {
     t.is(erc1155.print(options), printContract(buildERC1155(options)));
   });
 }
packages/core/cairo/src/tests/with_components_on/multisig/multisig.test.ts (1)

14-14: Consider extracting macros configuration to a constant for consistency.

The inline object { withComponents: true } works correctly, but the account test file (line 9 in account.test.ts) uses a named constant withComponentsMacroON = { withComponents: true }. Using a constant improves consistency across the test suite and makes future changes easier.

🔎 Suggested refactor
+const withComponentsMacroON = { withComponents: true };
+
 const defaults: MultisigOptions = {
   name: 'MyMultisig',
   quorum: '2',
   upgradeable: commonDefaults.upgradeable,
   info: commonDefaults.info,
-  macros: { withComponents: true },
+  macros: withComponentsMacroON,
 };
packages/core/cairo/src/tests/with_components_on/account/account.test.ts (1)

38-55: Consider avoiding mutation of the options object.

Line 40 mutates the options object directly (options.macros = withComponentsMacroON), which could cause side effects if the same object is reused elsewhere. While safe in the current usage, creating a new object would be cleaner and more maintainable.

🔎 Suggested refactor
 function testAPIEquivalence(title: string, opts?: AccountOptions) {
-  const options = opts === undefined ? defaults : opts;
-  options.macros = withComponentsMacroON;
+  const options = opts === undefined ? { ...defaults, macros: withComponentsMacroON } : { ...opts, macros: withComponentsMacroON };
   test(title, t => {
     t.is(
       account.print(options),
packages/core/cairo/src/tests/with_components_on/governor/governor.test.ts (1)

1-33: Well-structured test helpers with minor refactor opportunity.

The test file introduces clean helpers (testGovernor, testAPIEquivalence) that validate both contract generation and API parity. Good test design.

However, line 29 mutates options.macros after const assignment. Consider refactoring to avoid mutation:

🔎 Optional refactor to eliminate mutation
 function testAPIEquivalence(title: string, opts?: GovernorOptions) {
-  const options = opts === undefined ? defaults : opts;
-  options.macros = withComponentsMacroON;
+  const options = {
+    ...(opts === undefined ? defaults : opts),
+    macros: withComponentsMacroON,
+  };
   test(title, t => {
     t.is(governor.print(options), printContract(buildGovernor(options)));
   });
 }
packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts (1)

1-55: Excellent test structure with minor refactor opportunity.

The test file provides comprehensive ERC721 test coverage with well-designed helpers. The allFeaturesON constant nicely consolidates feature flags for full-featured testing.

Similar to the governor tests, line 51 mutates options.macros after const assignment. Consider the same refactoring pattern:

🔎 Optional refactor to eliminate mutation
 function testAPIEquivalence(title: string, opts?: ERC721Options) {
-  const options = opts === undefined ? defaults : opts;
-  options.macros = withComponentsMacroON;
+  const options = {
+    ...(opts === undefined ? defaults : opts),
+    macros: withComponentsMacroON,
+  };
   test(title, t => {
     t.is(erc721.print(options), printContract(buildERC721(options)));
   });
 }
packages/core/cairo/src/generate/multisig.ts (1)

21-23: Suggest optional refactor: Consider inlining prepareBlueprint.

Since prepareBlueprint is only called once and the blueprint is simple, you could consider inlining it directly into generateMultisigOptions for simplicity. However, the current structure is clear and maintainable, so this is purely optional.

🔎 Optional inline refactor
-function prepareBlueprint(opts: GeneratorOptions) {
-  return {
-    name: ['MyMultisig'],
-    quorum: ['1', '2', '42'],
-    upgradeable: [true, false],
-    info: infoOptions,
-    macros: resolveMacrosOptions(opts.macros),
-  };
-}
-
 export function* generateMultisigOptions(opts: GeneratorOptions): Generator<Required<MultisigOptions>> {
-  const blueprint = prepareBlueprint(opts);
+  const blueprint = {
+    name: ['MyMultisig'],
+    quorum: ['1', '2', '42'],
+    upgradeable: [true, false],
+    info: infoOptions,
+    macros: resolveMacrosOptions(opts.macros),
+  };
   yield* generateAlternatives(blueprint);
 }
packages/ui/src/cairo/AccessControlSection.svelte (1)

59-93: LGTM! Clean implementation of the DAR configuration UI.

The new "Roles (Default Admin Rules)" option and conditional input fields are well-structured. Error handling is correctly wired via the use:error directive for each DAR parameter.

One minor observation: the placeholder="" attributes on lines 76, 84, and 91 are empty strings. Consider whether placeholder hints (e.g., "e.g., 86400" for delay in seconds) would improve UX.

packages/core/cairo/src/scripts/update-scarb-project.ts (2)

18-34: Consider aligning CLI argument name with type property name.

The CLI argument uses --royalty=... (line 32: args.royalty) but the internal property is named royaltyInfo. While this works correctly, aligning the names would reduce confusion for users and maintainers.

-    royaltyInfo: parseRoyaltyInfoSubset(args.royalty ?? defaults.royaltyInfo),
+    royaltyInfo: parseRoyaltyInfoSubset(args.royaltyInfo ?? args.royalty ?? defaults.royaltyInfo),

Alternatively, document the --royalty flag if the shorter name is preferred.


177-190: Inconsistent undefined handling in parseMacrosSubset.

Unlike other parse functions (parseKindSubset, parseAccessSubset, parseRoyaltyInfoSubset) that accept string | undefined and throw on undefined, this function only accepts string. While this works because the caller always provides a default, it's inconsistent with the pattern used elsewhere.

🔎 Proposed fix for consistency
-function parseMacrosSubset(value: string): MacrosSubset {
+function parseMacrosSubset(value: string | undefined): MacrosSubset {
+  if (value === undefined) {
+    throw new Error(`Failed to resolve macros subset from 'undefined'.`);
+  }
   switch (value.toLowerCase()) {
packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md (1)

392-395: Consider using spaces instead of tabs in code blocks.

The markdownlint tool flags hard tabs at lines 393-394 within the import block. While this doesn't affect functionality, consistent use of spaces improves readability across different editors.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d85b3ba and f982263.

⛔ Files ignored due to path filters (27)
  • packages/core/cairo/src/account.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/contract.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/custom.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/erc1155.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/erc20.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/erc721.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/governor.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/multisig.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/contract/contract.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/erc1155/erc1155.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/erc1155/erc1155.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/governor/governor.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/multisig/multisig.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/tests/with_components_on/vesting/vesting.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/src/vesting.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo/test_project/Scarb.lock is excluded by !**/*.lock
📒 Files selected for processing (90)
  • .github/workflows/compile-cairo-alpha-project.yml
  • .github/workflows/compile-cairo-project.yml
  • packages/common/src/ai/descriptions/cairo.ts
  • packages/core/cairo/CHANGELOG.md
  • packages/core/cairo/README.md
  • packages/core/cairo/ava.config.js
  • packages/core/cairo/package.json
  • packages/core/cairo/src/account.ts
  • packages/core/cairo/src/add-pausable.ts
  • packages/core/cairo/src/common-components.ts
  • packages/core/cairo/src/common-options.ts
  • packages/core/cairo/src/contract.ts
  • packages/core/cairo/src/custom.ts
  • packages/core/cairo/src/erc1155.test.ts.md
  • packages/core/cairo/src/erc1155.ts
  • packages/core/cairo/src/erc20.ts
  • packages/core/cairo/src/erc721.ts
  • packages/core/cairo/src/generate/account.ts
  • packages/core/cairo/src/generate/custom.ts
  • packages/core/cairo/src/generate/erc1155.ts
  • packages/core/cairo/src/generate/erc20.ts
  • packages/core/cairo/src/generate/erc721.ts
  • packages/core/cairo/src/generate/governor.ts
  • packages/core/cairo/src/generate/multisig.ts
  • packages/core/cairo/src/generate/sources.ts
  • packages/core/cairo/src/generate/vesting.ts
  • packages/core/cairo/src/governor.ts
  • packages/core/cairo/src/index.ts
  • packages/core/cairo/src/multisig.ts
  • packages/core/cairo/src/print.ts
  • packages/core/cairo/src/scripts/update-scarb-project.ts
  • packages/core/cairo/src/set-access-control.ts
  • packages/core/cairo/src/set-macros.ts
  • packages/core/cairo/src/set-royalty-info.ts
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/src/test.ts
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/contract/contract.test.ts
  • packages/core/cairo/src/tests/with_components_off/contract/contract.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc1155/erc1155.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc1155/erc1155.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts
  • packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts
  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc1155/erc1155.test.ts
  • packages/core/cairo/src/tests/with_components_on/erc1155/erc1155.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/governor/governor.test.ts
  • packages/core/cairo/src/tests/with_components_on/governor/governor.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/multisig/multisig.test.ts
  • packages/core/cairo/src/tests/with_components_on/multisig/multisig.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/vesting/vesting.test.ts
  • packages/core/cairo/src/tests/with_components_on/vesting/vesting.test.ts.md
  • packages/core/cairo/src/utils/duration.ts
  • packages/core/cairo/src/utils/version.ts
  • packages/core/cairo/src/vesting.ts
  • packages/core/cairo/test_project/Scarb.toml
  • packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts
  • packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts
  • packages/ui/api/ai-assistant/function-definitions/cairo.ts
  • packages/ui/src/cairo/AccessControlSection.svelte
  • packages/ui/src/cairo/AccountControls.svelte
  • packages/ui/src/cairo/App.svelte
  • packages/ui/src/cairo/CustomControls.svelte
  • packages/ui/src/cairo/ERC1155Controls.svelte
  • packages/ui/src/cairo/ERC20Controls.svelte
  • packages/ui/src/cairo/ERC721Controls.svelte
  • packages/ui/src/cairo/GovernorControls.svelte
  • packages/ui/src/cairo/MacrosSection.svelte
  • packages/ui/src/cairo/MultisigControls.svelte
  • packages/ui/src/cairo/RoyaltyInfoSection.svelte
  • packages/ui/src/cairo/UpgradeabilityField.svelte
  • packages/ui/src/cairo/VestingControls.svelte
💤 Files with no reviewable changes (1)
  • packages/core/cairo/src/erc1155.test.ts.md
🧰 Additional context used
🧠 Learnings (20)
📓 Common learnings
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 638
File: packages/core/cairo_alpha/src/account.test.ts.md:18-18
Timestamp: 2025-08-19T15:21:06.991Z
Learning: In the OpenZeppelin contracts-wizard repository, the cairo_alpha package (packages/core/cairo_alpha) and the stable cairo package (packages/core/cairo) are separate implementations that do not need to have the same code or matching dependency versions. The cairo_alpha package targets dependencies that are either newer than or the same as the stable cairo package, allowing it to test and support newer Cairo/Scarb/OpenZeppelin versions while the stable version maintains compatibility with stable releases.
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 663
File: packages/core/cairo_alpha/src/custom.test.ts.md:12-12
Timestamp: 2025-09-12T15:07:08.673Z
Learning: In the OpenZeppelin contracts-wizard cairo_alpha package changelog (packages/core/cairo_alpha/CHANGELOG.md), each alpha version gets its own separate entry under the "Unreleased" section rather than updating a single entry. This allows tracking of changes across different alpha releases (e.g., v3.0.0-alpha.0, v3.0.0-alpha.1, v3.0.0-alpha.2 all have separate entries).
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 638
File: packages/core/cairo_alpha/src/scripts/update-scarb-project.ts:62-79
Timestamp: 2025-08-19T15:18:09.410Z
Learning: In the cairo_alpha package (packages/core/cairo_alpha), the OpenZeppelin dependency in test_project/Scarb.toml is expected to be in { git, tag } form rather than a simple registry-style string, so the update script only needs to update the tag value, not convert between formats.
Learnt from: ernestognw
Repo: OpenZeppelin/contracts-wizard PR: 609
File: .changeset/sour-hats-grow.md:2-6
Timestamp: 2025-08-15T22:49:25.653Z
Learning: In OpenZeppelin contracts-wizard, breaking changes that have concrete migration paths (like dependency migrations from Community Contracts to OpenZeppelin Contracts) can be handled as minor version bumps instead of major bumps, per maintainer ernestognw's versioning policy.
📚 Learning: 2025-08-15T23:23:13.097Z
Learnt from: ernestognw
Repo: OpenZeppelin/contracts-wizard PR: 609
File: packages/core/solidity/src/signer.ts:31-38
Timestamp: 2025-08-15T23:23:13.097Z
Learning: In OpenZeppelin contracts-wizard, the `setUpgradeableAccount` function deliberately sets `c.upgradeable = false` after upgradeable setup to exclude EIP712Upgradeable and ERC7739Upgradeable variants (avoiding per-call SLOAD overhead). This architectural pattern necessitates manual `_disableInitializers()` setup in both account.ts and signer.ts since the standard upgradeable constructor logic doesn't apply when upgradeability is disabled post-setup.

Applied to files:

  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.md
  • packages/core/cairo/src/account.ts
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/ui/src/cairo/AccountControls.svelte
  • packages/ui/src/cairo/MultisigControls.svelte
📚 Learning: 2025-08-15T22:52:34.129Z
Learnt from: ernestognw
Repo: OpenZeppelin/contracts-wizard PR: 609
File: packages/core/solidity/src/account.ts:89-0
Timestamp: 2025-08-15T22:52:34.129Z
Learning: In OpenZeppelin contracts-wizard, non-upgradeable accounts still require initializer logic (Initializable, _disableInitializers(), and initialize() function) because ERC-4337 accounts are typically deployed by factories as minimal clone proxies, which cannot use constructors effectively for initialization. This is the intended deployment pattern for ERC-4337 account abstraction, even for non-upgradeable accounts.

Applied to files:

  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
📚 Learning: 2025-08-20T20:23:30.259Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 609
File: packages/core/solidity/src/set-upgradeable.ts:0-0
Timestamp: 2025-08-20T20:23:30.259Z
Learning: In OpenZeppelin contracts-wizard, upgradeable contracts use two different strategies for Initializable imports: Account contracts directly import from contracts-upgradeable/proxy/utils/Initializable.sol for explicit clarity, while other upgradeable contracts (ERC20, ERC721, Governor, etc.) use helpers to automatically transpile imports to upgradeable versions. This architectural separation is intentional due to the special ERC-4337 requirements of account contracts.

Applied to files:

  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts.md
  • packages/ui/src/cairo/ERC721Controls.svelte
  • packages/core/cairo/README.md
  • packages/ui/src/cairo/GovernorControls.svelte
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/ui/src/cairo/ERC20Controls.svelte
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/ui/src/cairo/UpgradeabilityField.svelte
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/ui/src/cairo/AccountControls.svelte
  • packages/ui/src/cairo/MultisigControls.svelte
  • packages/core/cairo/src/multisig.ts
📚 Learning: 2025-08-19T15:31:24.984Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 0
File: :0-0
Timestamp: 2025-08-19T15:31:24.984Z
Learning: Changes within packages/core/cairo_alpha should have a corresponding changelog entry in packages/core/cairo_alpha/CHANGELOG.md under the Unreleased section to track these changes. When cairo_alpha is eventually promoted to cairo (stable), these entries will be moved into a changeset for cairo (stable).

Applied to files:

  • packages/core/cairo/CHANGELOG.md
  • packages/core/cairo/src/set-macros.ts
  • packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts
  • packages/core/cairo/README.md
  • packages/core/cairo/src/scripts/update-scarb-project.ts
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/ui/api/ai-assistant/function-definitions/cairo.ts
  • packages/core/cairo/package.json
  • packages/core/cairo/src/utils/version.ts
  • packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/common/src/ai/descriptions/cairo.ts
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/test_project/Scarb.toml
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
📚 Learning: 2025-09-12T15:07:08.673Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 663
File: packages/core/cairo_alpha/src/custom.test.ts.md:12-12
Timestamp: 2025-09-12T15:07:08.673Z
Learning: In the OpenZeppelin contracts-wizard cairo_alpha package changelog (packages/core/cairo_alpha/CHANGELOG.md), each alpha version gets its own separate entry under the "Unreleased" section rather than updating a single entry. This allows tracking of changes across different alpha releases (e.g., v3.0.0-alpha.0, v3.0.0-alpha.1, v3.0.0-alpha.2 all have separate entries).

Applied to files:

  • packages/core/cairo/CHANGELOG.md
  • packages/core/cairo/src/tests/with_components_off/contract/contract.test.ts.md
  • packages/ui/src/cairo/RoyaltyInfoSection.svelte
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts.md
  • packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts
  • packages/ui/src/cairo/ERC721Controls.svelte
  • packages/core/cairo/src/erc721.ts
  • packages/core/cairo/README.md
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/ui/src/cairo/ERC20Controls.svelte
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.md
  • packages/core/cairo/src/scripts/update-scarb-project.ts
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/src/test.ts
  • packages/ui/api/ai-assistant/function-definitions/cairo.ts
  • packages/core/cairo/package.json
  • packages/core/cairo/src/utils/version.ts
  • packages/ui/src/cairo/ERC1155Controls.svelte
  • packages/core/cairo/src/custom.ts
  • packages/ui/src/cairo/UpgradeabilityField.svelte
  • packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts.md
  • packages/core/cairo/src/erc1155.ts
  • packages/common/src/ai/descriptions/cairo.ts
  • packages/core/cairo/test_project/Scarb.toml
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/core/cairo/src/erc20.ts
  • packages/core/cairo/src/set-royalty-info.ts
  • packages/core/cairo/src/vesting.ts
📚 Learning: 2025-08-19T15:21:06.991Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 638
File: packages/core/cairo_alpha/src/account.test.ts.md:18-18
Timestamp: 2025-08-19T15:21:06.991Z
Learning: In the OpenZeppelin contracts-wizard repository, the cairo_alpha package (packages/core/cairo_alpha) and the stable cairo package (packages/core/cairo) are separate implementations that do not need to have the same code or matching dependency versions. The cairo_alpha package targets dependencies that are either newer than or the same as the stable cairo package, allowing it to test and support newer Cairo/Scarb/OpenZeppelin versions while the stable version maintains compatibility with stable releases.

Applied to files:

  • packages/core/cairo/CHANGELOG.md
  • packages/core/cairo/src/tests/with_components_off/contract/contract.test.ts.md
  • packages/core/cairo/src/set-macros.ts
  • packages/ui/src/cairo/RoyaltyInfoSection.svelte
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts.md
  • packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts
  • packages/core/cairo/src/erc721.ts
  • packages/core/cairo/README.md
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.md
  • packages/core/cairo/src/add-pausable.ts
  • packages/core/cairo/src/common-options.ts
  • packages/core/cairo/src/scripts/update-scarb-project.ts
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts
  • packages/core/cairo/src/account.ts
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/src/test.ts
  • packages/ui/api/ai-assistant/function-definitions/cairo.ts
  • packages/core/cairo/package.json
  • packages/core/cairo/src/contract.ts
  • packages/core/cairo/src/utils/version.ts
  • packages/ui/src/cairo/ERC1155Controls.svelte
  • packages/core/cairo/src/custom.ts
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts.md
  • packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts.md
  • packages/core/cairo/src/erc1155.ts
  • packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts.md
  • packages/common/src/ai/descriptions/cairo.ts
  • packages/ui/src/cairo/App.svelte
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/test_project/Scarb.toml
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/core/cairo/src/erc20.ts
  • packages/core/cairo/src/common-components.ts
📚 Learning: 2025-08-15T22:49:25.653Z
Learnt from: ernestognw
Repo: OpenZeppelin/contracts-wizard PR: 609
File: .changeset/sour-hats-grow.md:2-6
Timestamp: 2025-08-15T22:49:25.653Z
Learning: In OpenZeppelin contracts-wizard, breaking changes that have concrete migration paths (like dependency migrations from Community Contracts to OpenZeppelin Contracts) can be handled as minor version bumps instead of major bumps, per maintainer ernestognw's versioning policy.

Applied to files:

  • packages/core/cairo/CHANGELOG.md
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/package.json
  • packages/core/cairo/src/utils/version.ts
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/erc20.ts
📚 Learning: 2025-08-19T15:18:09.410Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 638
File: packages/core/cairo_alpha/src/scripts/update-scarb-project.ts:62-79
Timestamp: 2025-08-19T15:18:09.410Z
Learning: In the cairo_alpha package (packages/core/cairo_alpha), the OpenZeppelin dependency in test_project/Scarb.toml is expected to be in { git, tag } form rather than a simple registry-style string, so the update script only needs to update the tag value, not convert between formats.

Applied to files:

  • packages/core/cairo/src/tests/with_components_off/contract/contract.test.ts.md
  • packages/ui/src/cairo/RoyaltyInfoSection.svelte
  • .github/workflows/compile-cairo-project.yml
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts.md
  • packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts
  • packages/core/cairo/src/erc721.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts
  • packages/core/cairo/README.md
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts.md
  • .github/workflows/compile-cairo-alpha-project.yml
  • packages/core/cairo/src/add-pausable.ts
  • packages/core/cairo/src/scripts/update-scarb-project.ts
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc1155/erc1155.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/src/test.ts
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts
  • packages/core/cairo/package.json
  • packages/core/cairo/src/utils/version.ts
  • packages/ui/src/cairo/UpgradeabilityField.svelte
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts.md
  • packages/common/src/ai/descriptions/cairo.ts
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/test_project/Scarb.toml
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/core/cairo/src/erc20.ts
📚 Learning: 2025-09-24T20:55:43.331Z
Learnt from: CoveMB
Repo: OpenZeppelin/contracts-wizard PR: 665
File: packages/ui/src/solidity/remix.node.test.ts:0-0
Timestamp: 2025-09-24T20:55:43.331Z
Learning: In the OpenZeppelin contracts-wizard project, the UI package tests use AVA framework which provides browser API polyfills, so `atob` and other browser APIs are available in the test environment.

Applied to files:

  • packages/core/cairo/src/tests/with_components_on/erc1155/erc1155.test.ts
  • packages/core/cairo/src/tests/with_components_on/governor/governor.test.ts
  • packages/core/cairo/src/tests/with_components_off/account/account.test.ts
  • packages/core/cairo/src/tests/with_components_on/account/account.test.ts
  • packages/core/cairo/src/tests/with_components_on/custom/custom.test.ts
  • packages/core/cairo/src/tests/with_components_on/erc20/erc20.test.ts
  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts
  • packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts
  • packages/core/cairo/src/tests/with_components_on/multisig/multisig.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc1155/erc1155.test.ts
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts
  • packages/core/cairo/src/tests/with_components_off/vesting/vesting.test.ts
  • packages/core/cairo/src/tests/with_components_off/contract/contract.test.ts
📚 Learning: 2025-10-24T11:16:17.021Z
Learnt from: immrsd
Repo: OpenZeppelin/contracts-wizard PR: 698
File: packages/core/cairo_alpha/src/set-access-control.ts:0-0
Timestamp: 2025-10-24T11:16:17.021Z
Learning: In Cairo code generation (packages/core/cairo_alpha), trait imports like `DefaultConfig` must remain in scope even if not explicitly referenced in the generated code, as Cairo's compiler uses them implicitly for trait resolution.

Applied to files:

  • packages/core/cairo/src/index.ts
  • packages/core/cairo/src/set-macros.ts
  • packages/core/cairo/src/generate/custom.ts
  • packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts
  • packages/core/cairo/README.md
  • packages/core/cairo/src/scripts/update-scarb-project.ts
  • packages/core/cairo/src/account.ts
  • packages/core/cairo/src/test.ts
  • packages/core/cairo/src/custom.ts
  • packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts.md
  • packages/ui/src/cairo/App.svelte
  • packages/core/cairo/test_project/Scarb.toml
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/core/cairo/src/erc20.ts
📚 Learning: 2025-09-12T20:50:43.101Z
Learnt from: CoveMB
Repo: OpenZeppelin/contracts-wizard PR: 644
File: packages/ui/api/services/open-ai.ts:43-56
Timestamp: 2025-09-12T20:50:43.101Z
Learning: In the OpenZeppelin contracts-wizard project, the current streaming implementation in packages/ui/api/services/open-ai.ts intentionally handles text deltas and function_calls with different formats (raw text chunks vs JSON objects). While this can cause JSON.parse issues, harmonizing the response format is considered outside scope of dependency updates as it requires UI refactoring to handle unified streaming responses.

Applied to files:

  • packages/core/cairo/src/erc721.ts
📚 Learning: 2025-08-29T22:26:44.931Z
Learnt from: ernestognw
Repo: OpenZeppelin/contracts-wizard PR: 653
File: packages/core/solidity/src/account.ts:189-201
Timestamp: 2025-08-29T22:26:44.931Z
Learning: In ERC-7579, accounts support multiple execution paths: the standard ERC-4337 path requiring validators for UserOp validation, and the module execution path where executor modules can directly call executeFromExecutor to execute transactions on behalf of the account. This means accounts initialized with only an executor module are functional and valid according to the ERC-7579 specification.

Applied to files:

  • packages/core/cairo/README.md
📚 Learning: 2025-08-19T01:15:58.945Z
Learnt from: ernestognw
Repo: OpenZeppelin/contracts-wizard PR: 609
File: packages/core/solidity/src/signer.ts:45-49
Timestamp: 2025-08-19T01:15:58.945Z
Learning: The OpenZeppelin contracts-upgradeable package includes upgradeable versions of signer contracts like SignerECDSAUpgradeable, SignerP256Upgradeable, SignerRSAUpgradeable, MultiSignerERC7913Upgradeable, and MultiSignerERC7913WeightedUpgradeable in the contracts/utils/cryptography/signers directory.

Applied to files:

  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/ui/src/cairo/UpgradeabilityField.svelte
  • packages/core/cairo/src/tests/with_components_off/multisig/multisig.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
  • packages/core/cairo/src/multisig.ts
📚 Learning: 2025-08-19T01:15:58.945Z
Learnt from: ernestognw
Repo: OpenZeppelin/contracts-wizard PR: 609
File: packages/core/solidity/src/signer.ts:45-49
Timestamp: 2025-08-19T01:15:58.945Z
Learning: All OpenZeppelin signer contracts have upgradeable variants available in the contracts-upgradeable package: SignerECDSAUpgradeable, SignerP256Upgradeable, SignerRSAUpgradeable, MultiSignerERC7913Upgradeable, and MultiSignerERC7913WeightedUpgradeable all exist in contracts/utils/cryptography/signers/ directory.

Applied to files:

  • packages/core/cairo/src/tests/with_components_on/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/ui/src/cairo/UpgradeabilityField.svelte
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
  • packages/core/cairo/src/set-upgradeable.ts
  • packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md
📚 Learning: 2025-11-03T12:18:33.779Z
Learnt from: typicalHuman
Repo: OpenZeppelin/contracts-wizard PR: 715
File: packages/core/solidity/src/stablecoin.ts:74-77
Timestamp: 2025-11-03T12:18:33.779Z
Learning: In packages/core/solidity/src/stablecoin.ts, the ERC20Restricted base contract from openzeppelin/community-contracts provides a default implementation of isUserAllowed that returns true for non-BLOCKED users (blocklist logic). Only allowlist mode needs to override isUserAllowed to check for Restriction.ALLOWED instead. Blocklist mode uses the default implementation without override.

Applied to files:

  • packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md
  • packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md
📚 Learning: 2025-09-18T20:18:23.799Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 652
File: packages/ui/api/ai-assistant/function-definitions/confidential.ts:32-38
Timestamp: 2025-09-18T20:18:23.799Z
Learning: In OpenZeppelin Wizard, the AI Assistant defines its own function definitions separately and does not use the MCP tools. This means the AI Assistant function definitions and MCP schemas can have different shapes without causing validation conflicts.

Applied to files:

  • packages/ui/api/ai-assistant/function-definitions/cairo.ts
📚 Learning: 2025-09-18T19:26:06.112Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 652
File: packages/core/confidential/print-versioned.js:1-1
Timestamp: 2025-09-18T19:26:06.112Z
Learning: CJS shims like `module.exports = require('./dist/print-versioned')` in packages/core/confidential are expected to be CJS-only and are used specifically within packages/ui, not as general-purpose exports requiring conditional exports mapping.

Applied to files:

  • packages/core/cairo/src/utils/version.ts
📚 Learning: 2025-08-21T19:44:06.797Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 609
File: packages/core/solidity/src/account.ts:191-204
Timestamp: 2025-08-21T19:44:06.797Z
Learning: Initializable is available in both openzeppelin/contracts and openzeppelin/contracts-upgradeable packages, so conditional imports like `openzeppelin/${opts.upgradeable ? 'contracts-upgradeable' : 'contracts'}/proxy/utils/Initializable.sol` are valid and will resolve correctly.

Applied to files:

  • packages/ui/src/cairo/UpgradeabilityField.svelte
  • packages/core/cairo/src/set-upgradeable.ts
📚 Learning: 2025-09-19T14:28:19.048Z
Learnt from: ericglau
Repo: OpenZeppelin/contracts-wizard PR: 652
File: packages/core/confidential/src/zip-hardhat.test.ts.md:116-121
Timestamp: 2025-09-19T14:28:19.048Z
Learning: In OpenZeppelin Confidential Contracts, the decimals() function is limited to 6, not the typical 18 decimals found in standard ERC20 tokens. This affects overflow calculations when working with premint amounts and SafeCast.toUint64().

Applied to files:

  • packages/core/cairo/src/erc20.ts
🧬 Code graph analysis (19)
packages/core/cairo/src/tests/with_components_on/account/account.test.ts (1)
packages/core/cairo_alpha/src/tests/with_components_on/account/account.test.ts (2)
  • testEthAccount (23-33)
  • testAccount (11-21)
packages/core/cairo/src/generate/vesting.ts (1)
packages/core/cairo/src/vesting.ts (1)
  • VestingOptions (31-39)
packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts (1)
packages/common/src/ai/descriptions/cairo.ts (1)
  • cairoAccessDescriptions (35-43)
packages/core/cairo/src/generate/erc20.ts (5)
packages/core/cairo/src/set-access-control.ts (2)
  • AccessSubset (52-52)
  • resolveAccessControlOptions (54-79)
packages/core/cairo/src/set-upgradeable.ts (1)
  • upgradeableOptions (9-9)
packages/core/cairo_alpha/src/generate/erc20.ts (1)
  • prepareBlueprint (17-34)
packages/core/cairo/src/erc20.ts (1)
  • ERC20Options (42-53)
packages/core/cairo_alpha/src/erc20.ts (1)
  • ERC20Options (42-53)
packages/core/cairo/src/erc721.ts (1)
packages/core/cairo/src/contract.ts (2)
  • ContractBuilder (103-314)
  • components (128-130)
packages/core/cairo/src/common-options.ts (1)
packages/core/cairo/src/set-access-control.ts (1)
  • AccessControl (43-48)
packages/core/cairo/src/scripts/update-scarb-project.ts (3)
packages/core/cairo/src/generate/sources.ts (2)
  • KindSubset (25-25)
  • writeGeneratedSources (167-192)
packages/core/cairo/src/set-access-control.ts (1)
  • AccessSubset (52-52)
packages/core/cairo/src/set-royalty-info.ts (2)
  • RoyaltyInfoSubset (16-16)
  • defaults (10-14)
packages/core/cairo/src/account.ts (1)
packages/core/cairo/src/contract.ts (2)
  • ContractBuilder (103-314)
  • components (128-130)
packages/core/cairo/src/set-access-control.ts (3)
packages/core/cairo/src/contract.ts (3)
  • ContractBuilder (103-314)
  • components (128-130)
  • BaseImplementedTrait (59-70)
packages/core/cairo/src/common-components.ts (1)
  • addSRC5Component (60-72)
packages/core/cairo/src/utils/duration.ts (1)
  • durationToSeconds (14-26)
packages/core/cairo/src/test.ts (5)
packages/core/cairo/src/generate/sources.ts (2)
  • KindSubset (25-25)
  • writeGeneratedSources (167-192)
packages/core/cairo_alpha/src/generate/sources.ts (2)
  • KindSubset (25-25)
  • writeGeneratedSources (167-192)
packages/core/cairo/src/set-access-control.ts (1)
  • AccessSubset (52-52)
packages/core/cairo/src/set-royalty-info.ts (1)
  • RoyaltyInfoSubset (16-16)
packages/core/cairo_alpha/src/set-royalty-info.ts (1)
  • RoyaltyInfoSubset (16-16)
packages/ui/api/ai-assistant/function-definitions/cairo.ts (3)
packages/common/src/ai/descriptions/cairo.ts (1)
  • cairoPrompts (4-16)
packages/ui/api/ai-assistant/function-definitions/shared.ts (1)
  • addFunctionPropertiesFrom (31-46)
packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts (1)
  • cairoSharedFunctionDefinition (71-104)
packages/core/cairo/src/contract.ts (1)
packages/core/cairo_alpha/src/contract.ts (1)
  • Contract (4-18)
packages/core/cairo/src/utils/version.ts (1)
packages/core/cairo_alpha/src/utils/version.ts (6)
  • contractsVersion (4-4)
  • contractsVersionTag (5-5)
  • edition (10-10)
  • cairoVersion (11-11)
  • scarbVersion (12-12)
  • compatibleContractsSemver (19-19)
packages/core/cairo/src/custom.ts (1)
packages/core/cairo/src/contract.ts (1)
  • ContractBuilder (103-314)
packages/core/cairo/src/erc1155.ts (1)
packages/core/cairo/src/contract.ts (2)
  • ContractBuilder (103-314)
  • components (128-130)
packages/core/cairo/src/generate/erc721.ts (1)
packages/core/cairo/src/set-royalty-info.ts (2)
  • RoyaltyInfoSubset (16-16)
  • resolveRoyaltyOptionsSubset (32-48)
packages/core/cairo/src/print.ts (1)
packages/core/cairo/src/contract.ts (3)
  • Contract (4-18)
  • constants (140-142)
  • Variable (90-96)
packages/core/cairo/src/governor.ts (1)
packages/core/cairo/src/utils/duration.ts (1)
  • durationToSeconds (14-26)
packages/core/cairo/src/multisig.ts (3)
packages/core/cairo_alpha/src/multisig.ts (3)
  • defaults (13-19)
  • buildMultisig (38-52)
  • MultisigOptions (25-28)
packages/core/cairo/src/set-upgradeable.ts (1)
  • setUpgradeableMultisig (51-56)
packages/core/cairo_alpha/src/set-upgradeable.ts (1)
  • setUpgradeableMultisig (51-56)
🪛 GitHub Check: CodeQL
packages/core/cairo/src/generate/sources.ts

[failure] 98-98: Use of a broken or weak cryptographic algorithm
A broken or weak cryptographic algorithm depends on sensitive data from a call to generateAccountOptions.

🪛 markdownlint-cli2 (0.18.1)
packages/core/cairo/src/tests/with_components_on/governor/governor.test.ts.md

22-22: Hard tabs
Column: 9

(MD010, no-hard-tabs)


177-177: Hard tabs
Column: 9

(MD010, no-hard-tabs)


262-262: Hard tabs
Column: 9

(MD010, no-hard-tabs)


347-347: Hard tabs
Column: 9

(MD010, no-hard-tabs)


432-432: Hard tabs
Column: 9

(MD010, no-hard-tabs)


517-517: Hard tabs
Column: 9

(MD010, no-hard-tabs)


612-612: Hard tabs
Column: 9

(MD010, no-hard-tabs)


697-697: Hard tabs
Column: 9

(MD010, no-hard-tabs)


782-782: Hard tabs
Column: 9

(MD010, no-hard-tabs)

packages/core/cairo/src/tests/with_components_off/erc721/erc721.test.ts.md

866-866: Hard tabs
Column: 9

(MD010, no-hard-tabs)


867-867: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1195-1195: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1294-1294: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1401-1401: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1402-1402: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1407-1407: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1520-1520: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1846-1846: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1847-1847: Hard tabs
Column: 9

(MD010, no-hard-tabs)


2087-2087: Hard tabs
Column: 9

(MD010, no-hard-tabs)


2614-2614: Hard tabs
Column: 9

(MD010, no-hard-tabs)

packages/core/cairo/src/tests/with_components_off/erc20/erc20.test.ts.md

61-61: Hard tabs
Column: 9

(MD010, no-hard-tabs)


134-134: Hard tabs
Column: 9

(MD010, no-hard-tabs)


452-452: Hard tabs
Column: 9

(MD010, no-hard-tabs)


453-453: Hard tabs
Column: 9

(MD010, no-hard-tabs)


828-828: Hard tabs
Column: 9

(MD010, no-hard-tabs)


903-903: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1051-1051: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1138-1138: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1237-1237: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1238-1238: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1243-1243: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1346-1346: Hard tabs
Column: 9

(MD010, no-hard-tabs)


2264-2264: Hard tabs
Column: 9

(MD010, no-hard-tabs)


2265-2265: Hard tabs
Column: 9

(MD010, no-hard-tabs)

packages/core/cairo/src/tests/with_components_off/governor/governor.test.ts.md

17-17: Hard tabs
Column: 9

(MD010, no-hard-tabs)


20-20: Hard tabs
Column: 9

(MD010, no-hard-tabs)


21-21: Hard tabs
Column: 9

(MD010, no-hard-tabs)


27-27: Hard tabs
Column: 9

(MD010, no-hard-tabs)


161-161: Hard tabs
Column: 9

(MD010, no-hard-tabs)


164-164: Hard tabs
Column: 9

(MD010, no-hard-tabs)


165-165: Hard tabs
Column: 9

(MD010, no-hard-tabs)


281-281: Hard tabs
Column: 9

(MD010, no-hard-tabs)


284-284: Hard tabs
Column: 9

(MD010, no-hard-tabs)


285-285: Hard tabs
Column: 9

(MD010, no-hard-tabs)


291-291: Hard tabs
Column: 9

(MD010, no-hard-tabs)


425-425: Hard tabs
Column: 9

(MD010, no-hard-tabs)


428-428: Hard tabs
Column: 9

(MD010, no-hard-tabs)


429-429: Hard tabs
Column: 9

(MD010, no-hard-tabs)


435-435: Hard tabs
Column: 9

(MD010, no-hard-tabs)


569-569: Hard tabs
Column: 9

(MD010, no-hard-tabs)


572-572: Hard tabs
Column: 9

(MD010, no-hard-tabs)


573-573: Hard tabs
Column: 9

(MD010, no-hard-tabs)


579-579: Hard tabs
Column: 9

(MD010, no-hard-tabs)


713-713: Hard tabs
Column: 9

(MD010, no-hard-tabs)


716-716: Hard tabs
Column: 9

(MD010, no-hard-tabs)


717-717: Hard tabs
Column: 9

(MD010, no-hard-tabs)


723-723: Hard tabs
Column: 9

(MD010, no-hard-tabs)


857-857: Hard tabs
Column: 9

(MD010, no-hard-tabs)


860-860: Hard tabs
Column: 9

(MD010, no-hard-tabs)


861-861: Hard tabs
Column: 9

(MD010, no-hard-tabs)


867-867: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1010-1010: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1013-1013: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1014-1014: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1020-1020: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1154-1154: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1157-1157: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1158-1158: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1164-1164: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1298-1298: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1301-1301: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1302-1302: Hard tabs
Column: 9

(MD010, no-hard-tabs)


1308-1308: Hard tabs
Column: 9

(MD010, no-hard-tabs)

packages/core/cairo/src/tests/with_components_off/custom/custom.test.ts.md

393-393: Hard tabs
Column: 9

(MD010, no-hard-tabs)


394-394: Hard tabs
Column: 9

(MD010, no-hard-tabs)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: boostsecurity - boostsecurityio/semgrep-pro
  • GitHub Check: validate-cairo
  • GitHub Check: build (solidity, default)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: validate-cairo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants