Skip to main content
Scaffold Stacks ships starter contracts for fungible tokens (SIP-010) and NFTs (SIP-009). This guide maps the specs to stacksdapp add templates, Clarity functions, and generated frontend hooks.

Contents

Official specifications

Metadata: SIP-016 · SIP-019 metadata updates

Scaffold commands

Do not hand-write a token from blog snippets. Use the template — it includes SIP-compatible functions, tests, requirements, and hooks. Each command creates:
  • contracts/contracts/<name>.clar with all required SIP functions
  • contracts/tests/<name>.test.ts (if no test file exists)
  • [contracts.<name>] entry in Clarinet.toml with correct epoch
  • [[project.requirements]] for the mainnet trait (Clarinet simnet type-checking)
  • Regenerated hooks in frontend/src/generated/hooks.ts

impl-trait rules

Common mistake

Cause: (impl-trait 'sip-010-trait) — a short name with no full SP… contract path.
Never use bare trait names like (impl-trait 'sip-010-trait). Use the full mainnet path or omit for testnet.

Network rules

Mainnet trait addresses

Scaffold templates include a comment with the exact mainnet impl-trait line to uncomment before mainnet deploy.

SIP-010 fungible tokens

Seven functions wallets and apps expect: The scaffold template also includes: Default: 6 decimals, owner = deployer at deploy time.

Frontend hooks

Hook naming: use{ContractPascal}_{FunctionPascal}. See Frontend guide for parsing get-balance results.

SIP-009 NFTs

Four functions for NFT interoperability: The scaffold template also includes:

Frontend hooks

End-to-end workflow

Same flow for --template sip009.

Customizing templates

After edits: checkgeneratetestdeploy. Trait errors: Troubleshooting