> For the complete documentation index, see [llms.txt](https://dev.ada-anvil.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ada-anvil.io/guides/nft-and-ft/mint-nft-cip-68/smart-contract.md).

# Smart Contract Guides

This section covers CIP-68 NFT minting using **smart contracts** for advanced validation logic and programmable metadata management.

{% hint style="warning" %}
**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.
{% endhint %}

{% hint style="success" %}
**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.
{% endhint %}

### 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**](/guides/nft-and-ft/mint-nft-cip-68/smart-contract/mint-logic.md)

**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**](/guides/nft-and-ft/mint-nft-cip-68/smart-contract/update-logic.md)

**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

{% hint style="info" %}
**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.
{% endhint %}

#### 2. Implementation Examples

[**Mint Example**](/guides/nft-and-ft/mint-nft-cip-68/smart-contract/mint-example.md)

**Implementation Guide** - Step-by-step Deno implementation for minting CIP-68 NFTs with smart contracts.

**Topics Covered:**

* Using `POST /blueprints/apply-params` to apply validator parameters
* Using `POST /transactions/build` to build mint transactions
* Dual-wallet signing process
* Complete working code examples

[**User Update Example**](/guides/nft-and-ft/mint-nft-cip-68/smart-contract/user-update-example.md)

**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**](/guides/nft-and-ft/mint-nft-cip-68/smart-contract/admin-update-example.md)

**Implementation Guide** - Complete admin-driven metadata update implementation.

**Topics Covered:**

* Admin signature authorization
* Full metadata update permissions
* No fee requirements
* Complete metadata structure modifications
