Built for Midnight Network Hackathon

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.

⚠️
Deploy & Interact require local setup. ZK proving keys are served from your local disk and the 1AM Wallet proof station calls back to your server — these features cannot run on Vercel or any hosted deployment. Clone & run locally →
6 compiled ZK circuits3 CI/CD workflowsPreprod-nativedisclose() enforced
6ZK Circuits Compiled
3GitHub Actions Workflows
< 2sAverage Proving Time
100%Preprod Native

Building on Midnight means fighting frictionthat 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

CI/CD Pipeline

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.

Proof Benchmarks

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.

ZK Privacy Model

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.

Live Dashboard

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

01

Push Code

Commit your .compact file to GitHub. The webhook fires immediately.

02

CI Compiles

compact CLI compiles your circuits inside the GitHub Actions runner.

03

Benchmark

Proving times are measured per circuit and stored in the database.

04

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

Public
totalSupply, admin, paused

export ledger

Public
localSecretKey() → Bytes<32>

witness

Private
mint / transfer / burn / …

export circuit

ZK proof
disclose(value)

required

Enforced

What your CI run looks like

contracts.yml — compile-and-benchmark

$ 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.

Midnight PreprodZK PrivacyGitHub ActionsProof Benchmarks