Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

What is magical-nft?

magical-nft is a comprehensive template for building fully onchain NFT projects. It provides a modular architecture that separates concerns into distinct contracts, making your projects easier to maintain and upgrade.

Why Use magical-nft?

Fully Onchain

Unlike traditional NFTs that store metadata and images on IPFS or centralized servers, magical-nft stores everything directly on the blockchain. This means:

  • Permanence - Your NFT assets will exist as long as the blockchain exists
  • Decentralization - No dependency on external services
  • Composability - Other contracts can easily interact with your NFT data

Modular Architecture

The template uses a three-contract architecture:

  1. Main Contract - Handles minting, ownership, and core logic
  2. Storage Contract - Stores assets using SSTORE2 for gas efficiency
  3. Renderer Contract - Generates tokenURI and metadata

This separation allows you to upgrade individual components without affecting the entire system.

Developer Experience

  • Pre-configured Foundry setup
  • TypeScript scripts for common tasks
  • Comprehensive deployment scripts
  • Asset conversion and upload tools

Use Cases

  • Generative art NFTs
  • Onchain game items
  • Dynamic NFTs with evolving metadata
  • Collectibles with rich onchain data