Skip to main content
Scaffold Stacks handles deploy, bindings, and frontend — you still write Clarity in contracts/contracts/*.clar. For language depth, use official Stacks docs. This page routes you there and lists syntax you will use daily.

Contents

Learning resources

Scaffold workflow

Contract tests live in contracts/tests/*.test.ts — no Docker. See Testing. Default new projects use Clarity 6 (epoch 4.0). See Clarity versions.

Syntax essentials

Clarity is LISP-like: expressions in parentheses.

Data variables

Functions

Responses and errors

Public functions return (response T uint) — success (ok value) or error (err uint):
  • asserts! — aborts with err if condition is false
  • try! — unwraps ok or propagates err

Built-in context

Use tx-sender vs contract-caller carefully for access control. See Contracts.

Maps and lists

Tokens

For SIP-010 fungible tokens and SIP-009 NFTs, use scaffold templates instead of writing from scratch:
Full trait tables and impl-trait rules: SIP standards Low-level token primitives:

Next steps