Skip to main content
Sigvex

Cairo (StarkNet) Analysis

Single-file Cairo analyzer with an embedded editor, compile-and-analyze workflow, and two supported checks.

What it is

A single-file Cairo analyzer built on the shared ZK analyze layout. It renders a Monaco-based editor, runs compile-and-analyze, lists findings, and links to the full ZK Studio. The Supported Checks panel lists the detectors that run against Cairo input.

Why it exists

Cairo / StarkNet code has arithmetic-specific failure modes — felt overflow and missing assertions — that are independent of on-chain semantics. This page surfaces those checks as a fast, single-file workflow.

Who uses it

  • Cairo author — checks a program before deploying to StarkNet.
  • Auditor — reviews a Cairo file from an audit engagement.

How to open it

  1. Sidebar → Library → Cairo (StarkNet).
  2. /libraryCairo (StarkNet) card.
  3. Direct URL — /cairo-analyze.

Using the page

  1. Editor — paste or type Cairo source.

  2. Analyze — findings populate below.

  3. Launch ZK Studio — opens /zk-studio?lang=cairo.

  4. Supported Checks — lists the two detectors that run against the file:

    Severity Detector
    High Felt Overflow
    Medium Missing Assertions

Inputs and outputs

Input Source Required
Cairo source Editor yes
Output Format Destination
Findings In-page list Editor section

Controls reference

  • Editor — Monaco editor with Cairo syntax highlighting.
  • Launch ZK Studio — opens the full studio at /zk-studio?lang=cairo.

Limits

  • Requires a signed-in account.
  • Single-file only. Multi-file projects need ZK Studio.

Troubleshooting

Symptom or error Cause Action
“Compile error” Cairo source fails to compile Fix syntax and retry.
No findings on a known issue Issue is outside the two supported checks Open the file in ZK Studio.