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
  • General Functions
  • Extension Mangement
  • Extension Metadata Functions
  • Extension Logic Overriding
  • Metadata Handling
  • Token Transfer Approval
  • Token Burn Callback
  • Royalties
  • Minting
  • ERC721
  • ERC1155

Was this helpful?

  1. Smart Contracts
  2. Manifold Creator
  3. Contracts
  4. Extensions

Extensions Functions

These functions are functions called by extensions built for ERC721 and ERC1155 Creator Contracts

General Functions

tokenExtension

Get the extension that minted the specified token. If not minted by a token, will return the 0x0 address

Permissions: Public function callable by anyone.

function tokenExtension(uint256 tokenId) external view returns (address)

Extension Mangement

Functions used to manage installed extensions

getExtensions

Gets a list of all registered extensions.

Permissions: Public function callable by anyone.

function getExtensions() view returns (address[] memory extensions)
registerExtension

Registers an extension, allowing it to access the mint function, and ability to set a token’s metadata URI or a base URI for that extension. The token URI for tokens minted by this extension will be baseURI<tokenID>. When registering an extension you can specify a third boolean parameter of "true" for baseURIIdentical to specify the token URI for all tokens to be identical (will not increment with appended tokenId).

Permissions: Owner/Admin function callable by contract owner only.

function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical)s, baseURI (string), baseURI (string)

function registerExtension(address extension, string calldata baseURI)
unregisterExtension

Unregisters an extension and removes access to the mint function and all other extension capabilities.

Permissions: Owner/Admin function callable by contract owner only.

function unregisterExtension(address extension)
blacklistExtension

Blacklists an extension, preventing future registrations of the address. This function also destroys all references to metadata associated with tokens created by this extension, making them effectively useless.

Permissions: Owner/Admin function callable by contract owner only.

function blacklistExtension(address extension)
setApproveTransferExtension

Permissions: Owner/Admin function callable by contract owner only.

function setApproveTransferExtension(address extension)
setRoyaltiesExtension

Override the royalties for all tokens minted by the specified extension

Permissions: Owner/Admin function callable by contract owner only.

function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints)

Extension Metadata Functions

Functions used by extensions to set the metadata of tokens minted by the extension

setBaseTokenURIExtension

Sets the base URI for any tokens minted from this extension. Once set, the metadata URI will be base_uri/<tokenId> by default.

Permissions: Only callable by an extension

function setBaseTokenURIExtension(string calldata uri)
setTokenURIPrefixExtension

Sets a prefix for all tokens minted from this extension. If configured, and a token has a URI set, tokenURI will return <prefixURI><tokenURI>.

Permissions: Only callable by an extension

function setTokenURIPrefixExtension(string calldata prefix)
setTokenURIExtension

Set the tokenURI for a specific token minted from this extension. Useful if you want to do something with a dynamic metadata server and need sequential numbering of tokens. Various methods defined below.

Permissions: Only callable by an extension and only on token minted by the extension

function setTokenURIExtension(uint256 tokenId, string calldata uri) external

function setTokenURIExtension(uint256[] memory tokenId, string[] calldata uri)

Extension Logic Overriding

The powerful thing about Manifold Creator is the ability for extensions to fully override core functionality of NFT smart contracts. The following is a list of functionality extensions can override.

Metadata Handling

If an extension implements this interface then all metadata logic will be deferred to the extension's tokenURI function.

Token Transfer Approval

Token Burn Callback

If an extension implements this interface, every time a token is burned it will call the extension's onBurn function.

Royalties

If an extension implements this interface, the Creator Contract will defer all royalty lookups to the extension for tokens minted by it.

Minting

These are functions used by extensions to mint NFTs. NFTs minted by the extension will adhere to the extension's overriding logic.

ERC721

mintExtension

Mints a token from the extension. Also can set token URI or token data (immutable for a token) if desired.

Token Data is useful if you wish to store additional data needed by the extension at no additional cost (e.g. mint ordering data).

Permissions: Only callable by an installed extension

function mintExtension(address to) returns (uint256)

function mintExtension(address to, string calldata uri) returns (uint256)

function mintExtension(address to, uint80 data) returns (uint256)
mintExtensionBatch

Batch mints tokens from the extension. Also can set token URI or token data (immutable for a token) if desired.

Token Data is useful if you wish to store additional data needed by the extension at no additional cost (e.g. mint ordering data).

Permissions: Only callable by an installed extension

function mintExtensionBatch(address to, uint16 count) returns (uint256[] memory)

function mintExtensionBatch(address to, string[] calldata uris) returns (uint256[] memory)

function mintExtensionBatch(address to, uint80[] calldata data) returns (uint256[] memory)

ERC1155

mintExtensionNew

Mints a completely new token with the given amount from an extension. If URI is empty, URI will fall back to the default URI configured.

Permissions: Only callable by an installed extension

function mintExtensionNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) returns (uint256[] memory)
mintExtensionExisting

Mints more of an existing token from the extension. Requires that the original token already exist and that it is not a token from an extension.

Permissions: Only callable by an installed extension

function mintExtensionExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts)

Last updated 10 months ago

Was this helpful?

Set the overall contract's approve transfer extension (See how to ). Applies to all tokens in the contract and takes precedent over any extension level approve transfer functionality. Unset by setting the extension to the 0x0 address.

An extension can fully manage the token metadata logic by implementing the interface.

An extension can control whether or not a token can be transferred. To do this, the extension must implement the interface (for ERC721) or the interface (for ERC1155).

If an extension implements this interface, by default, all transfers will call the extension's approveTransfer function prior to every token transfer. An extension can enable/disable this by calling the function.

An extension can receive a callback whenever a token is burned. To do this, the extension must implement the interface (for ERC721) or the interface (for ERC1155).

An extension can define the royalties for any tokens they mint. To do this, the extension must implement the interface.

Receive a Transfer Callback here
ICreatorExtensionTokenURI
IERC721CreatorExtensionApproveTransfer
IERC1155CreatorExtensionApproveTransfer
IERC721CreatorExtensionBurnable
IERC1155CreatorExtensionBurnable
ICreatorExtensionRoyalties
setApproveTransferExtension