AM

adavault/midnight-skill

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

10 stars 품질 67 트렌드 26MIT

Claude Code skill for writing and testing Compact smart contracts on Midnight

개요

An Agent Skill for writing, testing, and deploying on the . Built from Discord community knowledge, compiler validation, and real-world gotchas. This project extends the Midnight Network with additional developer tooling. Supports Claude Code, Cursor, Gemini CLI, VS Code Copilot, and 30+ other AI coding assistants. These examples are educational references. Any smart contract generated using this skill should be professionally audited before deployment to mainnet. AI-assisted code generation does not replace security review. All examples compiled and tested against (compact-runtime , ledger v8). Also compatible with Compact 0.29.0 (ledger v7). See gotcha #74 for migration guide. Every published example was recompiled from source against the current compiler. compact CLI , compiler , compact-runtime , Midnight.js , Node (mainnet + preprod; preview 1.0.1), Ledger 8.1.0. (support matrix) ⚠ compact --version reports the (0.5.1), not the compiler (0.31.1).

README

원문 README의 일부입니다. 원문 보기.

Midnight Compact Smart Contract Skill

An Agent Skill for writing, testing, and deploying Compact smart contracts on the Midnight blockchain. Built from Discord community knowledge, compiler validation, and real-world gotchas. This project extends the Midnight Network with additional developer tooling.

Supports Claude Code, Cursor, Gemini CLI, VS Code Copilot, and 30+ other AI coding assistants.

Important: These examples are educational references. Any smart contract generated using this skill should be professionally audited before deployment to mainnet. AI-assisted code generation does not replace security review.

Compiler-Validated

All examples compiled and tested against Compact 0.31.1 (compact-runtime 0.16.0, ledger v8). Also compatible with Compact 0.29.0 (ledger v7). See gotcha #74 for migration guide.

✅ Re-validated 2026-08-17 — all 29 examples compile on Compact 0.31.1

Every published example was recompiled from source against the current compiler.

set result
10 standalone validation contracts 10/10 PASS
19 remaining + new contracts 19/19 PASS
vendored OpenZeppelin compact-contracts 9/10 — see below

Toolchain: compact CLI 0.5.2, compiler 0.31.1, compact-runtime 0.16.0, Midnight.js 4.1.1, Node 1.0.2 (mainnet + preprod; preview 1.0.1), Ledger 8.1.0. (support matrix)

⚠ compact --version reports the CLI wrapper (0.5.1), not the compiler (0.31.1). Easy to confuse when checking which you are on.

🔴 Compact 0.31.0 has a soundness bug that can silently drop a range constraint. Use 0.31.1+. If you deployed anything built with 0.31.0, diff the verifier key — source review is explicitly not reliable for finding it. Details in SKILL.md.

Breaking changes found, and what they mean for older code:

  • CoinInfo is now an unbound identifier — hit by OZ’s archive/ShieldedToken.compact, which upstream has already retired. Expected, not a regression, but relevant to anyone carrying older Zswap coin code.
  • Zswap operators were renamed: receive → receiveShielded, sendImmediate → sendImmediateShielded. The compiler names the replacement in the error, so this migrates cleanly. All current examples already use the new names.

The per-example test counts in the table below were measured in March against Compact 0.29.0/0.30.0; compilation only was re-verified on 2026-08-17. The suites themselves were re-run on 2026-08-30 — see below.

✅ Re-validated 2026-08-30 — all 11 suites re-run, 676 tests passing

Not a recompile this time: every test suite was executed.

set result
10 standalone validation contracts 10/10 suites, 69 tests PASS
GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add adavault/midnight-skill
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →