Skip to content

CLI Quickstart

grysz edited this page Jun 5, 2026 · 1 revision

CLI Quickstart

Run from the repository root.

Test The Workspace

cargo fmt --check
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings

Compile A Contract

cargo run -p kaspascript-cli -- compile tests/contracts/escrow.ks

This writes:

tests/contracts/escrow.artifact.json

Inspect IR

cargo run -p kaspascript-cli -- inspect tests/contracts/escrow.ks

Verify An Artifact

cargo run -p kaspascript-cli -- verify tests/contracts/escrow.artifact.json

Build A Kernel Package

cargo run -p kaspascript-cli -- kernel package tests/contracts/escrow.ks \
  --target verified-tn12 \
  --output /tmp/escrow.kernel.json \
  --compute-grams 1000 \
  --tx-bytes 400

The package includes:

  • schema_version
  • package_target
  • source snapshots
  • compiler artifact summary
  • bytecode hex
  • bytecode ASM
  • kernel blueprint
  • capability profile
  • wallet previews
  • indexer schema
  • readiness report
  • fee estimate

Supported Package Targets

  • verified-tn12
  • tn10-toccata
  • toccata-preview
  • future-mainnet

Use verified-tn12 for the verified V1 subset. Use preview targets only when you want explicit gated warnings for upgrade research.

Clone this wiki locally