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

Features

magical-nft comes packed with features to help you build onchain NFT projects efficiently.

Core Features

🎨 Fully Onchain Storage

All your NFT assets are stored directly on the blockchain using SSTORE2, an efficient storage pattern that reduces gas costs significantly.

📦 Modular Contract Architecture

The template separates concerns into three main contracts:

  • Main Contract - ERC721 implementation with minting logic
  • Storage Contract - SSTORE2-based asset storage
  • Renderer Contract - Dynamic metadata and image generation

🔧 Developer Tools

Built-in scripts for common development tasks:

ScriptDescription
setupInitialize a new project from the template
extract-htmlExtract HTML assets from source files
convert-to-avifConvert images to AVIF format
base64-encodeEncode assets to base64
upload-all-filesUpload all assets to the storage contract
verifyVerify deployed contracts on block explorers

🚀 Deployment Scripts

Foundry deployment scripts for flexible deployment options:

  • Full Deploy - Deploy all contracts at once
  • Individual Deploy - Deploy contracts separately
  • Upload Scripts - Upload assets after deployment

Technical Stack

  • Solidity - Smart contract development
  • Foundry - Testing and deployment framework
  • Bun - TypeScript runtime for scripts
  • SSTORE2 - Efficient onchain storage
  • OpenZeppelin - Battle-tested contract libraries