-
Notifications
You must be signed in to change notification settings - Fork 183
Cairo: Support v3.0.0-alpha.2 #663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cairo: Support v3.0.0-alpha.2 #663
Conversation
📝 WalkthroughWalkthroughVersion 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks (2 passed, 1 inconclusive)❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
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.
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 unit tests
Comment |
ericnordelo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this 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 alphaKeeps 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
⛔ Files ignored due to path filters (10)
packages/core/cairo_alpha/src/account.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/contract.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/custom.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/erc1155.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/erc20.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/erc721.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/governor.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/multisig.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/src/vesting.test.ts.snapis excluded by!**/*.snappackages/core/cairo_alpha/test_project/Scarb.lockis 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.mdpackages/core/cairo_alpha/src/erc721.test.ts.mdpackages/core/cairo_alpha/src/custom.test.ts.mdpackages/core/cairo_alpha/test_project/Scarb.tomlpackages/core/cairo_alpha/src/contract.test.ts.mdpackages/core/cairo_alpha/src/utils/version.tspackages/core/cairo_alpha/CHANGELOG.mdpackages/core/cairo_alpha/src/account.test.ts.mdpackages/core/cairo_alpha/src/erc1155.test.ts.mdpackages/core/cairo_alpha/src/erc20.test.ts.mdpackages/core/cairo_alpha/src/multisig.test.ts.mdpackages/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.mdpackages/core/cairo_alpha/src/erc721.test.ts.mdpackages/core/cairo_alpha/src/custom.test.ts.mdpackages/core/cairo_alpha/test_project/Scarb.tomlpackages/core/cairo_alpha/src/contract.test.ts.mdpackages/core/cairo_alpha/src/utils/version.tspackages/core/cairo_alpha/CHANGELOG.mdpackages/core/cairo_alpha/src/account.test.ts.mdpackages/core/cairo_alpha/src/erc1155.test.ts.mdpackages/core/cairo_alpha/src/erc20.test.ts.mdpackages/core/cairo_alpha/src/multisig.test.ts.mdpackages/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.mdpackages/core/cairo_alpha/src/erc721.test.ts.mdpackages/core/cairo_alpha/src/custom.test.ts.mdpackages/core/cairo_alpha/test_project/Scarb.tomlpackages/core/cairo_alpha/src/contract.test.ts.mdpackages/core/cairo_alpha/src/utils/version.tspackages/core/cairo_alpha/CHANGELOG.mdpackages/core/cairo_alpha/src/account.test.ts.mdpackages/core/cairo_alpha/src/erc1155.test.ts.mdpackages/core/cairo_alpha/src/erc20.test.ts.mdpackages/core/cairo_alpha/src/multisig.test.ts.mdpackages/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.2Metadata-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 — LGTMPinned semver for alpha matches the guidance in the comment.
Also applies to: 19-19
4-4: Toolchain requirements verified for v3.0.0-alpha.2OZ 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.
No description provided.