Developer infrastructure
for Compact contracts
CompactForge gives every Midnight team the CI/CD pipeline, proof benchmarking, and real-time dashboard they need — without the friction.
Building on Midnight means fighting friction
that has nothing to do with ZK logic
No CI/CD for Compact
Teams manually compile Compact contracts locally. Zero automation to catch regressions the moment they're pushed.
No Proof Benchmarking
ZK proof generation times drift silently across commits. Nobody notices until a circuit doubles in proving time on Preprod.
No Shared Infrastructure
Every team spins up their own local Docker proof-server from scratch — burning hours before writing a single circuit.
Everything a Midnight team needs
Compile on every push, automatically
Three GitHub Actions workflows — contracts, frontend, typecheck — run in parallel on every commit. The Compact compiler catches circuit errors before they reach Preprod.
Track proving time, per circuit, per commit
Per-circuit proving times (k-value, constraint rows, milliseconds) measured on every CI run and stored in your Neon Postgres database — regressions visible instantly.
disclose() enforced at compile time
The bundled token_ledger.compact demonstrates Midnight's dual-state model with 6 circuits, witness-based private key auth, and a circuit breaker — correct disclose() usage throughout.
Unified visibility across all your contracts
Deployments, CI run history, benchmark charts, and contract details — all on a dark developer dashboard connected live to Neon Postgres. No stale data.
From commit to dashboard in 4 steps
Push Code
Commit your .compact file to GitHub. The webhook fires immediately.
CI Compiles
compact CLI compiles your circuits inside the GitHub Actions runner.
Benchmark
Proving times are measured per circuit and stored in the database.
Dashboard
Results appear live on the CompactForge dashboard. No manual steps.
6 ZK circuits.
disclose() on every ledger write.
The bundled token_ledger.compact demonstrates Midnight's full dual-state model — witness-based caller auth, a Map ledger, admin-controlled mint, ZK-private transfers, and an emergency circuit breaker.
mint(recipient, amount)
admin only
deposit(amount)
self-funded
transfer(recipient, amount)
ZK-private
burn(amount)
owner only
pause()
emergency
unpause()
emergency
Dual-State Architecture
Compact language — public ledger vs private witness
balances: Map<Bytes<32>, Uint<64>>export ledger
totalSupply, admin, pausedexport ledger
localSecretKey() → Bytes<32>witness
mint / transfer / burn / …export circuit
disclose(value)required
What your CI run looks like
$ compact compile contracts/token_ledger/token_ledger.compact contracts/token_ledger/build/token_ledger
Compiling 6 circuits:
circuit "deposit" (k=7, rows=92)
circuit "transfer" (k=9, rows=114)
circuit "mint" (k=9, rows=128)
circuit "burn" (k=8, rows=105)
circuit "pause" (k=7, rows=88)
circuit "unpause" (k=7, rows=88)
Overall progress [====================] 6/6
✓ Benchmark written → contracts/token_ledger/build/benchmark.json
✓ Posted to CompactForge Dashboard API — CI run recorded
$ ▋
Ready to build on Midnight
without the friction?
Open the dashboard, connect your 1AM Wallet on Preprod, and watch your contract's ZK circuits get benchmarked live.