4.0.
Contents
- Version and epoch mapping
- Adding contracts
- Downgrading an existing project
- Deploy implications
- When to use which version
Version and epoch mapping
clarity_version and epoch must match. Clarinet 3.23+ treats ambiguous configs as epoch 4.0. A C5 contract with epoch = "4.0" will misbehave on devnet deploy.
Each contract entry in contracts/Clarinet.toml looks like:
Adding contracts
add command writes the correct epoch into Clarinet.toml for the new contract entry. Contract templates (sip010, sip009) inherit --clarity-version (default 6).
Downgrading an existing project
If changing C6 to C5 manually:- Set
clarity_version = 5andepoch = "3.4"on each affected[contracts.*]entry - Regenerate deployment plans:
- Run
stacksdapp check && stacksdapp test - Redeploy
clarity_version = 5 with epoch = "4.0".
Deploy implications
Testnet and mainnet
- Direct broadcast via
@stacks/transactions - Works for C4, C5, and C6 when the node supports the epoch
- No Docker required
Devnet
- Clarity 6 requires Clarinet 3.23+ and the epoch 4.0 devnet snapshot
- C5/C6 deploys wait for epoch burn height before broadcasting
- Devnet
settings/Devnet.tomlincludes PoX stacking orders required for the epoch 4.0 snapshot. Do not remove them
stacksdapp doctor to verify your Clarinet version.
When to use which version
After any version change, run
stacksdapp generate so TypeScript bindings stay aligned.