Skip to content

Conversation

@immrsd
Copy link
Contributor

@immrsd immrsd commented Sep 12, 2025

No description provided.

@immrsd immrsd self-assigned this Sep 12, 2025
@immrsd immrsd requested review from a team as code owners September 12, 2025 14:41
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

📝 Walkthrough

Walkthrough

Version bump from OpenZeppelin Contracts for Cairo 3.0.0-alpha.1 to 3.0.0-alpha.2 across changelog, snapshot headers, version constants, and test project dependency tag. No logic or API changes beyond updated constant values.

Changes

Cohort / File(s) Summary of changes
Changelog
packages/core/cairo_alpha/CHANGELOG.md
Added breaking-change note for using OpenZeppelin Contracts for Cairo v3.0.0-alpha.2 under Unreleased.
Snapshot headers
packages/core/cairo_alpha/src/account.test.ts.md, .../contract.test.ts.md, .../custom.test.ts.md, .../erc1155.test.ts.md, .../erc20.test.ts.md, .../erc721.test.ts.md, .../governor.test.ts.md, .../multisig.test.ts.md, .../vesting.test.ts.md
Updated snapshot banner text from “3.0.0-alpha.1” to “3.0.0-alpha.2” across all blocks; no content or logic changes.
Version constants
packages/core/cairo_alpha/src/utils/version.ts
Updated exported constants contractsVersion and compatibleContractsSemver from '3.0.0-alpha.1' to '3.0.0-alpha.2'.
Test project dependency
packages/core/cairo_alpha/test_project/Scarb.toml
Bumped openzeppelin dependency tag from v3.0.0-alpha.1 to v3.0.0-alpha.2.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ignore-changeset

Suggested reviewers

  • ericglau
  • ericnordelo
  • CoveMB

Pre-merge checks (2 passed, 1 inconclusive)

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive No pull request description text was provided in the input, so I cannot determine whether the PR description is related or sufficiently informative relative to the changeset. Please add a short PR description that states the purpose (version bump to OpenZeppelin Cairo v3.0.0-alpha.2), calls out the breaking-change entry added to CHANGELOG, lists affected areas (version constants, snapshot headers, and Scarb.toml), and includes any migration or testing notes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Cairo: Support v3.0.0-alpha.2" is concise and accurately summarizes the primary change — updating Cairo-related artifacts to support OpenZeppelin Contracts for Cairo v3.0.0-alpha.2 (version constants, snapshot headers, and dependency tag), so it is clear and relevant for history scanning.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

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

LGTM!

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: 3

🧹 Nitpick comments (2)
packages/core/cairo_alpha/CHANGELOG.md (1)

6-6: Changelog entry added under Unreleased — LGTM.

Entry formatting matches prior items. Add a release date header when cutting the next version.

packages/core/cairo_alpha/src/utils/version.ts (1)

19-19: Minor DRY: derive compatible semver from contractsVersion for alpha

Keeps the two values in lockstep for pre-releases.

-export const compatibleContractsSemver = '3.0.0-alpha.2';
+// For alpha, pin exactly to the contractsVersion to avoid ranges.
+export const compatibleContractsSemver = contractsVersion;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9d58dc and 1216bee.

⛔ Files ignored due to path filters (10)
  • packages/core/cairo_alpha/src/account.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/contract.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/custom.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/erc1155.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/erc20.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/erc721.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/governor.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/multisig.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/src/vesting.test.ts.snap is excluded by !**/*.snap
  • packages/core/cairo_alpha/test_project/Scarb.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • packages/core/cairo_alpha/CHANGELOG.md (1 hunks)
  • packages/core/cairo_alpha/src/account.test.ts.md (26 hunks)
  • packages/core/cairo_alpha/src/contract.test.ts.md (9 hunks)
  • packages/core/cairo_alpha/src/custom.test.ts.md (8 hunks)
  • packages/core/cairo_alpha/src/erc1155.test.ts.md (15 hunks)
  • packages/core/cairo_alpha/src/erc20.test.ts.md (17 hunks)
  • packages/core/cairo_alpha/src/erc721.test.ts.md (19 hunks)
  • packages/core/cairo_alpha/src/governor.test.ts.md (10 hunks)
  • packages/core/cairo_alpha/src/multisig.test.ts.md (5 hunks)
  • packages/core/cairo_alpha/src/utils/version.ts (2 hunks)
  • packages/core/cairo_alpha/src/vesting.test.ts.md (6 hunks)
  • packages/core/cairo_alpha/test_project/Scarb.toml (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: ericglau
PR: OpenZeppelin/contracts-wizard#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
PR: OpenZeppelin/contracts-wizard#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: ericglau
PR: OpenZeppelin/contracts-wizard#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).
Learnt from: ernestognw
PR: OpenZeppelin/contracts-wizard#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-19T15:21:06.991Z
Learnt from: ericglau
PR: OpenZeppelin/contracts-wizard#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_alpha/src/governor.test.ts.md
  • packages/core/cairo_alpha/src/erc721.test.ts.md
  • packages/core/cairo_alpha/src/custom.test.ts.md
  • packages/core/cairo_alpha/test_project/Scarb.toml
  • packages/core/cairo_alpha/src/contract.test.ts.md
  • packages/core/cairo_alpha/src/utils/version.ts
  • packages/core/cairo_alpha/CHANGELOG.md
  • packages/core/cairo_alpha/src/account.test.ts.md
  • packages/core/cairo_alpha/src/erc1155.test.ts.md
  • packages/core/cairo_alpha/src/erc20.test.ts.md
  • packages/core/cairo_alpha/src/multisig.test.ts.md
  • packages/core/cairo_alpha/src/vesting.test.ts.md
📚 Learning: 2025-08-19T15:31:24.984Z
Learnt from: ericglau
PR: OpenZeppelin/contracts-wizard#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_alpha/src/governor.test.ts.md
  • packages/core/cairo_alpha/src/erc721.test.ts.md
  • packages/core/cairo_alpha/src/custom.test.ts.md
  • packages/core/cairo_alpha/test_project/Scarb.toml
  • packages/core/cairo_alpha/src/contract.test.ts.md
  • packages/core/cairo_alpha/src/utils/version.ts
  • packages/core/cairo_alpha/CHANGELOG.md
  • packages/core/cairo_alpha/src/account.test.ts.md
  • packages/core/cairo_alpha/src/erc1155.test.ts.md
  • packages/core/cairo_alpha/src/erc20.test.ts.md
  • packages/core/cairo_alpha/src/multisig.test.ts.md
  • packages/core/cairo_alpha/src/vesting.test.ts.md
📚 Learning: 2025-08-19T15:18:09.410Z
Learnt from: ericglau
PR: OpenZeppelin/contracts-wizard#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_alpha/src/governor.test.ts.md
  • packages/core/cairo_alpha/src/erc721.test.ts.md
  • packages/core/cairo_alpha/src/custom.test.ts.md
  • packages/core/cairo_alpha/test_project/Scarb.toml
  • packages/core/cairo_alpha/src/contract.test.ts.md
  • packages/core/cairo_alpha/src/utils/version.ts
  • packages/core/cairo_alpha/CHANGELOG.md
  • packages/core/cairo_alpha/src/account.test.ts.md
  • packages/core/cairo_alpha/src/erc1155.test.ts.md
  • packages/core/cairo_alpha/src/erc20.test.ts.md
  • packages/core/cairo_alpha/src/multisig.test.ts.md
  • packages/core/cairo_alpha/src/vesting.test.ts.md
📚 Learning: 2025-08-15T22:49:25.653Z
Learnt from: ernestognw
PR: OpenZeppelin/contracts-wizard#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_alpha/CHANGELOG.md
🧬 Code graph analysis (1)
packages/core/cairo_alpha/src/utils/version.ts (2)
packages/core/cairo_alpha/src/index.ts (2)
  • contractsVersion (26-26)
  • compatibleContractsSemver (26-26)
packages/core/cairo/src/utils/version.ts (2)
  • contractsVersion (4-4)
  • compatibleContractsSemver (19-19)
⏰ 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). (2)
  • GitHub Check: validate-cairo-alpha
  • GitHub Check: build (solidity, default)
🔇 Additional comments (9)
packages/core/cairo_alpha/test_project/Scarb.toml (1)

10-10: OZ Cairo tag bumped to v3.0.0-alpha.2 — LGTM; no stale refs found.

Confirmed packages/core/cairo_alpha/test_project/Scarb.toml and packages/core/cairo_alpha/src/utils/version.ts use v3.0.0-alpha.2; no remaining 3.0.0-alpha.1 occurrences outside CHANGELOG.md.

packages/core/cairo_alpha/src/contract.test.ts.md (1)

12-12: Snapshot header bump to alpha.2 only — LGTM; update snapshots.
Text-only header change; regenerate snapshots to lock this in.
Affected: packages/core/cairo_alpha/src/contract.test.ts.md — lines 12, 27, 47, 67, 92, 117, 157, 198, 240.

packages/core/cairo_alpha/src/vesting.test.ts.md (1)

12-12: Vesting snapshots: headers updated to alpha.2 — LGTM.
Confirmed 6 occurrences updated to "Compatible with OpenZeppelin Contracts for Cairo 3.0.0-alpha.2".

packages/core/cairo_alpha/src/multisig.test.ts.md (1)

12-12: Multisig snapshots: headers bumped — LGTM.
Confirmed 5 occurrences of "3.0.0-alpha.2" in packages/core/cairo_alpha/src/multisig.test.ts.md.

packages/core/cairo_alpha/src/erc20.test.ts.md (1)

12-12: ERC20 snapshots: bumped to 3.0.0-alpha.2 across 17 occurrences — LGTM.
No functional diffs visible; ensure test snapshots are regenerated.

packages/core/cairo_alpha/src/account.test.ts.md (1)

12-12: Approve — Account/EthAccount snapshots: headers moved to 3.0.0-alpha.2

Metadata-only change; re-run snapshot tests. 26 occurrences confirmed in packages/core/cairo_alpha/src/account.test.ts.md.

packages/core/cairo_alpha/src/governor.test.ts.md (1)

12-12: Governor snapshots: header bump only — LGTM. Verified 10 occurrences of "3.0.0-alpha.2" in packages/core/cairo_alpha/src/governor.test.ts.md; approving header-only change.

packages/core/cairo_alpha/src/utils/version.ts (2)

4-4: Version constants updated to 3.0.0-alpha.2 — LGTM

Pinned semver for alpha matches the guidance in the comment.

Also applies to: 19-19


4-4: Toolchain requirements verified for v3.0.0-alpha.2

OZ 3.0.0-alpha.2 recommends Scarb 2.12.0, cairo-lang-compiler 2.12.0, Sierra 1.7.0, Cairo edition 2024_07. packages/core/cairo_alpha/src/utils/version.ts sets contractsVersion = '3.0.0-alpha.2' and packages/core/cairo_alpha/test_project/Scarb.toml already pins openzeppelin tag = "v3.0.0-alpha.2" (line 10). No changes required.

@ericglau ericglau merged commit 607dd0c into OpenZeppelin:master Sep 12, 2025
19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants