Skip to main content

Smart Contracts Overview

Template

  • The contract manages creation of templates and categories with useful view functions.
  • Templates are the backbone of mQuark, containing attributes that define the structure and metadata of an NFT. These templates are created by mQuark administrators and help standardize NFTs for better interoperability. The Template's name and description are not as important as the attributes for interoperability.

Registry

  • Entry smart contract for the protocol. It manages the Entity registration, it acts like a factory contract; deploys a new entity contract every time a new entity is registered.

Controller

  • It is used to set some neccessary variables like template prices, royalties and contracts addresses.

Subscriber

  • It is responsible for managing the subscriptions, unlocking tokens, transferring URIs, setting subscription prices, and other necessary settings by the protocol.

Entity

  • Allows entities to create their collections and keeps track of them. In addition to that, it allows entities to import their external ERC721 collections to the protocol.
  • Entites can withdraw funds from their multiple collections at once to this contract and withdraw them to their wallets.

Imported Contracts

  • It allows external NFT 721 contracts to use subscription feature in the ecosystem.

NFT Implementations

ERC721/1155 V1

  • They are being used to create collections by using minimal-proxy pattern. They have built-in functions for minting purposes. Every entity will have its own ERC721/1155 proxy contract. This feature significantly reduces the gas cost of deploying a new collection.

ERC721 V2

  • All the below V2 contracts implement these new functions here.

Mint

  • It only implements NFTs with Static and Limited Mint Type.

MintURI

  • It only implements NFTs with Dynamic Mint Type.

MintURIWhitelist

  • It only implements NFTs with Dynamic Mint Type with Whitelist feature.

MintWhitelist

  • It only implements NFTs with Static and Limited Mint Type with Whitelist feature.

SouldboundMint

  • It only implements NFTs with Static and Limited Mint Type with Soulbound feature.

SoulboundMintUpdateURI

  • It only implements NFTs with Static and Limited Mint Type with Soulbound and Update Token URI feature.