LogoLogo
Manifold for Developers
Manifold for Developers
  • Introduction
  • Shopify Merch Bridge
    • Overview
    • Tutorial
      • Step 1: Product Gate Setup
        • 1.1: Configure the Product
        • 1.2: Install Manifold Merch Bridge
        • 1.2: Create a New Product Gate
        • 1.3: Link a Product to the Gate
        • 1.4: Add Rules
      • Step 2: Store Theme Setup
        • 2.1 The Theme Editor
        • 2.2 Product Page Setup
        • 2.3 Cart Page Setup
    • Advanced Configuration
    • FAQ / Error Help
    • Reference
      • Product and Gate Configuration
        • Shopify Products
        • Product Gates
          • Gate Products
          • Rules
      • Custom Themes
      • Updating to the Latest Version
      • UI Configuration Options
      • Advanced Usage
      • Common Issues
  • Guides
    • Getting Started
    • HTML
    • React
    • NextJS
    • Vue
    • Wix
    • Squarespace
      • Simple Squarespace Site
      • Customised Squarespace Template
  • Resources
    • Apps
      • Grant Types
    • Widgets
      • Directory
      • Manifold CSS Variables
        • Scheme Utility Classes
        • List of Manifold CSS Variables
      • Connect Widget
        • Blockchain Interaction
        • Wallet Authentication
        • Data Client
          • NFT Information Retrieval
            • getNFT
            • getNFTsOfOwner
            • ownerHasNFT
            • getCollectors
          • Data Storage and Retrieval
        • Advanced Configuration
        • Customization & Styling
        • Automatic Error Handling
      • Campaign Widget
        • Campaign Creation
          • Questionnaire
        • Campaign Progress
        • Customization & Styling
      • Curation Widget
      • Marketplace Widgets
        • Widgets
          • Data Attributes
          • Layout Widgets
          • Card Widgets
          • Listing Widgets
        • Window Events
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 3.2.1 - CSS Selector Changes
          • 3.1.1 - CSS Selector Changes
      • Claim Widgets
        • Widgets
          • Data Attributes
          • Complete Claim Widget
          • Buy Button Only Widget
          • Mint Count Widget
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 1.7.0, 1.7.1 - CSS Selector Changes
      • Restricted Token Widget
        • Customization & Styling
      • Wallet Identity Widget
        • Customization & Styling
      • Subscription Widget
      • 6551 Display Widget
    • Manifold Ethereum Provider
  • Tools and APIs
    • Merkle Tree Tool
    • Snapshot Tool
    • Discord Tools
    • Server-Side Session Authentication
      • Signature Grant
      • Authorization Code Grant
  • Smart Contracts
    • Manifold Creator
      • Contracts
        • Creator Core
          • Common Functions
          • ERC721 Functions
          • ERC1155 Functions
        • Extensions
          • Extensions Functions
          • Extensions Examples
          • Extensions Deployment Guide
            • Dynamic NFT Extension
            • Lazy Mint Extension ERC1155
            • Lazy Mint Extension ERC721
        • Mint Permissions
          • Mint Permissions Functions
      • Prior Versions
        • 1.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
        • 2.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
    • Marketplace
      • Identity Verifier
    • Royalty Registry
  • Contact Us
Powered by GitBook
On this page

Was this helpful?

  1. Smart Contracts
  2. Manifold Creator
  3. Prior Versions
  4. 1.0.x
  5. Extensions

Extensions Deployment Guide

This guide will walk you through some common extension use cases that will hopefully give you a base for writing your own! The first thing to understand really is the relationship between your "core" contract and any "extensions" attached to it.

Tokens minted directly on your core contract (using functions like mintBase and mintBaseBatch are managed by your core contract. Meaning - the tokenURI, ownership, etc is all managed by the base contract. In basic terms - this is just a regular NFT. Nothing special. Then there are tokens minted on your core contract via an extension (using functions like mintExtension and mintExtensionBatch). Tokens minted in this fashion are managed by the extension. This can have any arbitrary logic in it to handle the token, such as making it non-transferrable, making dynamic metadata, etc. It is important to note that extensions themselves do not manage tokens. This means that if you want to write an extension, you'll want to deploy a core contract first.

Before we get into concrete examples, I'll give you some analogies to help you better understand the relationship between extensions and core contracts.

Miké

Let's say you are a global brand called Miké. You have various sub-brands, like Wknd. As a global brand, you want to delegate product definitions to the various other entities, while still keeping a unified brand. For example - let's say I buy a pair of Air Wknds (which are tokens vended through the Wknd extension contract). These would be minted, as, let's say token #2 in the Miké store. Whenever a website wants to display this token, they can make a request to get the info for it from the Miké core contract. However - this contract has delegated the logic for displaying this token to its subsidiary, the Wknd extension contract. All that Miké knows is that token #2 is managed by Wknd, and to ask Wknd for the info. This is just one example of how tokens are managed by extensions. Let's take a look at another example now.

Froyo

Let's say that you run a froyo shop. You could, of course, pour some froyo and then sell it to a customer. This is akin to minting on your base contract. However, as you might guess, this is not very scalable. So maybe you want self-server froyo machines - this is where extensions come in. With an extension, people can simply pour their own froyo, pay for it, and leave. You could have rules like - you can only purchase 1 cup of froyo at a time. Or - you can only purchase blueberry flavor if you are wearing blue jeans. Or - if this is your 2nd cup of froyo for the day, you get a 50% discount. As you can see in this case, extensions are also super helpful for different minting methods.

Hopefully these examples give you a good peek into what is possible with extensions! I think the power of them is that you can think more about app development and business logic and less about solidity-specific details.

Last updated 2 years ago

Was this helpful?