Conversation
WalkthroughThis pull request updates toolchain and dependency versions across the project. A Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🧪 Cairo Contract Size Benchmark DiffBYTECODE SIZE (felts) (limit: 81,920 felts)
SIERRA CONTRACT CLASS SIZE (bytes) (limit: 4,089,446 bytes)
This comment was generated automatically from benchmark diffs. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.tool-versions:
- Around line 1-3: The .tool-versions file currently pins scarb to 2.17.0-rc.2
which mismatches what starknet-foundry v0.58.1 expects (scarb 2.16.1) and also
overrides universal-sierra-compiler; update .tool-versions to align with Foundry
by setting scarb to 2.16.1 and remove (or comment/document) the
universal-sierra-compiler entry so Foundry’s bundled USC is used, or
alternatively add a short note in the repo documentation stating that scarb
2.17.0-rc.2 + universal-sierra-compiler override have been validated for this
project if you intend to keep the RC versions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 60d964d9-35eb-459d-a024-a41b1f5e987f
⛔ Files ignored due to path filters (1)
Scarb.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
.tool-versionsScarb.toml
| scarb 2.17.0-rc.2 | ||
| starknet-foundry 0.58.1 | ||
| universal-sierra-compiler 2.8.0-rc.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
`What is the official compatibility guidance (or release notes) for:
- scarb 2.17.0-rc.2
- cairo 2.17.0-rc.2
- starknet-foundry 0.58.1
- universal-sierra-compiler 2.8.0-rc.0
Please provide sources from official repositories/docs and indicate whether this exact combination is supported.`
💡 Result:
Official compatibility / release guidance (from official repos/docs)
Scarb v2.17.0-rc.2
- Release notes state Scarb
v2.17.0-rc.2upgrades/bundles Cairo tov2.17.0-rc.2. [1]
Cairo v2.17.0-rc.2
- GitHub release exists for Cairo
v2.17.0-rc.2(released Mar 15, 2026), but the release entry itself provides no compatibility matrix beyond “Cairo compiler.” [2]
starknet-foundry v0.58.1
- Release notes for
0.58.1(Apr 1, 2026) list fixes/additions, but do not declare a specific compatible Scarb/Cairo/USC version set. [3] - The Starknet Foundry docs explicitly note (starting from
0.56.0) thatsnforgerequires Scarb>= 2.12.0. This is the closest thing to “official compatibility guidance” for Scarb. [4] - In the
v0.58.1repo,.tool-versionspinsscarb 2.16.1(suggesting what the project itself was developed/tested with at that tag). [5]
universal-sierra-compiler (USC) v2.8.0-rc.0
- Release exists for USC
2.8.0-rc.0(Feb 19, 2026), but the GitHub release entry provides no detailed notes. [6] - The USC
README(at tagv2.8.0-rc.0) documents supported Sierra versions, listing 1.8.0, 1.7.0, 1.6.0, … etc. [7] - Starknet docs state USC is bundled with Starknet Foundry (i.e., typically you don’t install it separately when using Foundry). [8]
Is this exact combination officially supported?
Not explicitly. There is no official statement (in the Scarb/Cairo/Foundry/USC release notes or docs above) that the specific quartet:
scarb 2.17.0-rc.2+cairo 2.17.0-rc.2+starknet-foundry 0.58.1+universal-sierra-compiler 2.8.0-rc.0
is a tested/supported combination.
What is explicitly supported/claimed:
- Scarb
2.17.0-rc.2bundles Cairo2.17.0-rc.2. [1] - Foundry requires Scarb
>= 2.12.0(so2.17.0-rc.2satisfies the minimum), but Foundry0.58.1itself pinsscarb 2.16.1in.tool-versionsand does not promise compatibility with the2.17.0release candidate line. [4][5] - USC
2.8.0-rc.0documents Sierra-version support (up to Sierra1.8.0per the README), but Foundry generally bundles USC and does not, here, claim support for overriding it with that specific RC build. [7][8]
Conclusion: this exact combo is not officially declared “supported”; it’s at best “likely to work” based on minimum constraints, but not something the official sources confirm as a validated set. [1][4][5][7][8]
Sources
[1] Scarb release notes v2.17.0-rc.2 (bundles Cairo v2.17.0-rc.2) (github.com)
[2] Cairo GitHub release v2.17.0-rc.2 (github.com)
[3] Starknet Foundry GitHub release v0.58.1 (github.com)
[4] Starknet Foundry book: snforge requires Scarb >= 2.12.0 (github.com)
[5] starknet-foundry tag v0.58.1 .tool-versions (pins scarb 2.16.1) (github.com)
[6] USC GitHub release list showing 2.8.0-rc.0 (github.com)
[7] USC README at v2.8.0-rc.0 (supported Sierra versions list) (github.com)
[8] Starknet docs: USC is bundled with Starknet Foundry (docs.starknet.io)
Citations:
- 1: https://github.com/software-mansion/scarb/releases
- 2: https://github.com/starkware-libs/cairo/releases/tag/v2.17.0-rc.2
- 3: https://github.com/foundry-rs/starknet-foundry/releases/tag/v0.58.1
- 4: https://github.com/foundry-rs/starknet-foundry/releases
- 5: https://github.com/foundry-rs/starknet-foundry/blob/v0.58.1/.tool-versions
- 6: https://github.com/software-mansion/universal-sierra-compiler/releases
- 7: https://github.com/software-mansion/universal-sierra-compiler/tree/v2.8.0-rc.0
- 8: https://docs.starknet.io/learn/cheatsheets/tools?utm_source=openai
🏁 Script executed:
#!/bin/bash
# Read-only check: ensure key pinned versions stay synchronized across config files.
# Expected: Scarb.toml and .tool-versions values for scarb/snforge_std(starknet-foundry) are aligned.
set -euo pipefail
echo "== Extract from Scarb.toml =="
SCARB_TOML_VERSION=$(rg -n '^scarb-version\s*=\s*".*"$' Scarb.toml | sed -E 's/.*"([^"]+)".*/\1/')
SNFORGE_STD_VERSION=$(rg -n '^snforge_std\s*=\s*".*"$' Scarb.toml | sed -E 's/.*"([^"]+)".*/\1/')
echo "scarb-version: ${SCARB_TOML_VERSION}"
echo "snforge_std: ${SNFORGE_STD_VERSION}"
echo
echo "== Extract from .tool-versions =="
SCARB_TOOL_VERSION=$(rg -n '^scarb\s+' .tool-versions | awk '{print $2}')
FOUNDRY_TOOL_VERSION=$(rg -n '^starknet-foundry\s+' .tool-versions | awk '{print $2}')
USC_TOOL_VERSION=$(rg -n '^universal-sierra-compiler\s+' .tool-versions | awk '{print $2}')
echo "scarb: ${SCARB_TOOL_VERSION}"
echo "starknet-foundry: ${FOUNDRY_TOOL_VERSION}"
echo "universal-sierra-compiler: ${USC_TOOL_VERSION}"
echo
echo "== Consistency checks =="
test "${SCARB_TOML_VERSION}" = "${SCARB_TOOL_VERSION}" && echo "OK: scarb versions match" || echo "MISMATCH: scarb versions differ"
test "${SNFORGE_STD_VERSION}" = "${FOUNDRY_TOOL_VERSION}" && echo "OK: snforge_std and starknet-foundry match" || echo "MISMATCH: snforge_std and starknet-foundry differ"Repository: OpenZeppelin/cairo-contracts
Length of output: 359
Resolve the Scarb version mismatch with starknet-foundry 0.58.1.
starknet-foundry 0.58.1 pins scarb 2.16.1 in its own .tool-versions (see GitHub), but this repo pins scarb 2.17.0-rc.2—an RC version one release ahead. While Foundry requires only scarb >= 2.12.0, using an RC build (2.17.0) beyond what the dependency was developed/tested with risks subtle compile or runtime mismatches. Additionally, universal-sierra-compiler is normally bundled with Foundry and should not be overridden without explicit testing.
Either align with the versions Foundry 0.58.1 pins (scarb 2.16.1 + bundled USC), or document that the RC combination has been validated for your project.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.tool-versions around lines 1 - 3, The .tool-versions file currently pins
scarb to 2.17.0-rc.2 which mismatches what starknet-foundry v0.58.1 expects
(scarb 2.16.1) and also overrides universal-sierra-compiler; update
.tool-versions to align with Foundry by setting scarb to 2.16.1 and remove (or
comment/document) the universal-sierra-compiler entry so Foundry’s bundled USC
is used, or alternatively add a short note in the repo documentation stating
that scarb 2.17.0-rc.2 + universal-sierra-compiler override have been validated
for this project if you intend to keep the RC versions.
| @@ -0,0 +1,3 @@ | |||
| scarb 2.17.0-rc.2 | |||
| starknet-foundry 0.58.1 | |||
| universal-sierra-compiler 2.8.0-rc.0 | |||
There was a problem hiding this comment.
Just want to make sure that this file got committed intentionally. Btw, what is the main reasoning for starting to track it?
There was a problem hiding this comment.
It is intentional, the reason being for the worfklow to get the universal-sierra-compiler 2.8.0-rc.0, since foundry uses the latest stable by default, and 2.7.0 doesn't support scarb 2.17.
Summary by CodeRabbit