Guides
Smart Contract Guides
This section covers CIP-68 NFT minting using smart contracts for advanced validation logic and programmable metadata management.
Smart Contract Complexity: Smart contract development on Cardano requires a solid understanding of the UTXO model and can be particularly challenging for developers coming from account-based blockchains, as it demands careful consideration of concurrency patterns and state management across multiple UTXOs.
We've Got You Covered: While Cardano smart contracts can be complex, we've broken down the concepts and implementation steps to help you get a minting project off the ground successfully.
When to Use Smart Contracts#
Choose smart contracts over native scripts when you need:
- Advanced validation logic beyond simple signature/time constraints
- Programmable metadata updates with custom business rules. (i.e. Only the owner and the Admin can update the metadata)
- Complex authorization patterns (multi-sig, role-based access, etc.)
Guide Structure#
1. Understanding Smart Contract Logic#
Mint Logic#
Conceptual Guide - Understanding how the mint validator creates CIP-68 token pairs and enforces compliance.
Topics Covered:
- Token pair creation (reference + user tokens)
- CIP-68 metadata validation
- Smart contract parameterization
Update Logic#
Conceptual Guide - Understanding how the spend validator enables metadata updates with authorization controls.
Topics Covered:
- User vs admin authorization paths
- Fee mechanisms and ownership verification
- Metadata transformation logic
- Security model and validation flow
Choose Your Learning Path:
🎓 Conceptual Path: Start with logic guides to understand validation → Then implement 📋 Implementation Path: Jump to examples for quick setup → Return to logic when needed
New to Cardano smart contracts? Take the conceptual path for better understanding. Experienced developer? The implementation path gets you running quickly.
2. Implementation Examples#
Mint Example#
Implementation Guide - Step-by-step Deno implementation for minting CIP-68 NFTs with smart contracts.
Topics Covered:
- Using
POST /blueprints/apply-paramsto apply validator parameters - Using
POST /transactions/buildto build mint transactions - Dual-wallet signing process
- Complete working code examples
User Update Example#
Implementation Guide - Complete user-driven metadata update implementation.
Topics Covered:
- Dynamic UTXO discovery via Blockfrost
- User token ownership verification
- Fee payment to admin (1 ADA)
- Limited metadata field updates
Admin Update Example#
Implementation Guide - Complete admin-driven metadata update implementation.
Topics Covered:
- Admin signature authorization
- Full metadata update permissions
- No fee requirements
- Complete metadata structure modifications