Freee Docs
  • Guide
  • Getting Started
    • How do I connect my wallet to Freee?
    • How do I mint on Freee?
    • Gas Fees
  • Freee Create
    • What can I create on Freee?
    • Single-Edition (ERC-721)
      • How to create a Edition
      • Managing your Edition (ERC-721)
    • Drop (ERC-721)
      • How to create a Drop (ERC-721)
      • How to set up the artwork folder for your Drops collection
      • How to set up the .csv file in your Drops collection
      • Managing your Drop (ERC-721)
    • Collection (ERC-721)
      • How to create a collection (ERC721)
      • How to upload collection artworks?
      • Managing your Collection (ERC721)
        • Manage Sale Stages
        • Manage Pre-reveal & Reveal
        • General Settings
      • Others
        • In depth outline of collection artworks folder
        • In-depth Outline of collection metadata CSV
    • Multi-Edition (ERC-1155)
      • How to Create a Multi-Edition
      • Managing your Collection (Onchain)
    • More Features
      • How can I create an Airdrop?
      • How can I create an Allowlist?
      • Receive blast rewards
    • Create FAQs
      • Can I connect a multi-sig wallet?
      • How do I use a split contract with my collection?
      • How do I withdraw my earnings?
      • Do I have to pay a fee to collect my earnings?
      • Can I add a custom payout address to my collection?
  • Smart Contracts
    • Deployed Contract Addresses
      • Mainnets
      • Testnets
    • Smart Contracts Event-based Overview
    • 1155 Contracts
      • Creating a Contract
      • Creating a Token
      • Selling a Token
      • Minting Tokens
      • Permissions
    • 721 Contracts
      • NFT Creator Factory
      • NFT Implementation
      • Edition Metadata Renderer
      • Drop Metadata Renderer
      • Collection Metadata Renderer
  • Freee Platform Fees
  • Create, share, and collect to earn
    • Understanding Rewards on Freee
    • How to create to earn
    • How to share to earn
    • How to collect to earn
    • Diamond Rewards Chart
  • Freee FAQs
    • Why can't I mint from a collection ?
    • Why can't I see my minted NFT(s) ?
    • Why did my mint transaction fail ?
  • Legal
    • Privacy Policy
    • Terms of Service
Powered by GitBook
On this page
  • Mint Fee
  • Mint Function
  • Minter Strategy Contracts
  • Fixed Price Strategy
  • Merkle Proof Strategy
  • Admin Minting
  1. Smart Contracts
  2. 1155 Contracts

Minting Tokens

PreviousSelling a TokenNextPermissions

Last updated 1 year ago

Mint Fee

Freee charges a small fee for minting an NFT.

There is no charge to the creator, all the funds from the sales go to the creator.

Lastly, the mint fee doesn't apply to admin minted NFT (airdropping).

The best way to find the mint fee for a specific contract is to retrieve it from the contract by calling the mintFee function. You can read more about the mint fee .

Mint Function

Purchase tokens given a minter contract and minter arguments

  • minter: The minter contract to use

  • tokenId: The token ID to purchase

  • quantity: The quantity of tokens to purchase

  • minterArguments: The arguments to pass to the minter (detail in the minters section)

*The minter arguments are different for each minter contract and are listed in the section.

function mintWithRewards(
    IMinter1155 minter,
    uint256 tokenId,
    uint256 quantity,
    bytes calldata minterArguments,
    address mintReferral
) external payable nonReentrant 

Minter Strategy Contracts

The minting logic for 1155's lives outside of the main 1155 contract.

It lives in separate contracts called minters.

To mint a token the mint function is called on the main 1155 contract and then minter checks if the user should be able to mint.

Then the minter tells the main 1155 contract if it should mint or not.

*Note, that the minter arguments are type bytes

Fixed Price Strategy

Mint NFTs for a specific ETH price.

ETH transaction value = ((price + mint fee) * amount)

minterArguments: User address to mint to, in bytes

*Note, the payment amount of ETH must be set an override if using wagmi or ethers.js.

Getting the Mint Price

Calling the sale function on the fixed-price minter will return the price for a specific token. function sale(address tokenContract, uint256 tokenId)

Merkle Proof Strategy

Mints tokens based on a merkle tree.

ETH transaction value = ((price + mint fee) * amount)

minterArguments: Address to mint to, Max quantity, Price per token, Merkle proof

Admin Minting

Admins can mint NFTs to addresses. These NFTs do not incur the mint fee.

function adminMint(
    address recipient, 
    uint256 tokenId, 
    uint256 quantity, 
    bytes memory data
) external onlyAdminOrRole(tokenId, PERMISSION_BIT_MINTER)
function adminMintBatch(
    address recipient, 
    uint256[] memory tokenIds, 
    uint256[] memory quantities, 
    bytes memory data
) public nonReentrant

View the list of deployed contract addresses .

here
here