Skip to main content

Perform a free mint

Free mints are the simplest form of collection release. When compared to primary sale, the primary difference is that these are not paid transactions, thus "free". You may also know these as "airdrops".

Immutable offers a number of different options for you to conduct a free mint. Approaches differ in the Immutable features you utilise and there are differences in gas costs and user experience mechanics. These are detailed below.

Perform a free mintPerform a free mint
💡WHO IS THIS FOR?
Developers aiming to facilitate free mint or airdrops on Immutable zkEVM.

Why conduct a free mint?

There are generally a number of reasons for conducting a free mint in a web3 game:

  • Distribution as a means of reward: This is a tactic for games to keep their communities engaged, allowing players to own a new asset which may or may not be usable in-game. Nevertheless, it provides players with an elevated sense of status and belonging.
  • Distribution as a means of customer acqusition: Similar to primary sales, free mint is also often used as a tactic to acquire future players. Thus, similar consideration apply as in a primary sale, you can find these detailed in the Perform a Primary Sale article.

Methods to platform for a free mint

Regardless of the above choice in why you're conducting a free mint, there are two distinct ways of platforming on-chain.

Method 1: Direct mint

There are 2 different user experience scenarios here,

  • The first is when you as a developer initiates a mint and issue to users' wallets without the user needing to take action before the mint
  • The alternative is the minting occurs only when a user takes action, ie initiates a mint via a user experience flow

We will take both approaches in turn:

Airdrop: Direct mint to customer initiated by you the game developer / studio

Direct mint using standard Immutable preset contracts

💡Recommended method
This is currently one of the recommended methods to do a free mint on zkEVM. Using the Minting API with our standard preset contracts. Alternatively You can also use the free claim method if you want to give players more control.

This is our recommended method to do free mints today on Immutable zkEVM, it's the most cost efficient as well as the least amount of front-end development work for your team. The best way to conduct this is by utilising our Minting API and taking advantage of our Gas Sponsorship for Gamer promotional period. You may also trigger this via some game play mechanic, the implementation would be the same.

Our Minting API allows you to mint directly to users' wallet addresses regardless of what the user chooses as their preferred wallet (i.e. Immutable Passport, Metamask etc). We support both ERC-721 and ERC-1155 tokens.

A summary of the relevant minting methods in our Minting API is as follows. Please note again, you should use our standard preset contracts for the Minting API to work.

MethodERC standardWhere you would use this methodRecommendation
mintBatch() with Metadata

ERC-721
  • Easiest way to mint as metadata can be prepared in advance using the BaseURI/Token_ID file structure
  • Immutable encourages minters to include metadata in API request for improved performance
  • Not as gas efficient as mintBatchByQuantity()
✅ Recommend using this method now given the Gas Sponsorship for Gamers promotion
mintBatchByQuantity() with Metadata

ERC-721
  • Most gas efficient method
  • Useful if you want the Token_IDs to be sequential, as they are system generated
  • Can designate where the Token_ID sequence should start, default is 2^128
  • Immutable encourages minters to include metadata in API request for improved performance
  • Cannot prepare metadata in advance as Token_ID unknown until mint is complete; metadata refresh may be required post mint if metadata files are not saved in the BaseURI/Token_ID file structure within 10 seconds of minting.
Recommend migrating to using this after the Gas Sponsorship promotion
safeMintBatch() with Metadata

ERC-1155
  • Works similar to mintBatch() for ERC-1155; where Token_ID is specified at time of mint
  • Metadata files should be prepared using the BaseURI/Token_ID file structure
  • Metadata should be included in API requests when you are creating a new Token_ID
  • Metadata should not be included in API requests when you are increasing the quantity of an existing Token_ID
Use only if your architecture requires ERC-1155 tokens

The gas cost for utilising these methods will be subsidised by Immutable until early next year as per our Gas Sponsorship for Gamer promotional. After this, gas should be very cost effective and we will have management and reporting tools made available to you via Immutable Developer Hub.

Direct mint using custom primary sales contract

💡Method coming soon with cost implications
You cannot use custom contracts with our Minting API currently, this feature is coming soon. Without our standard contract, your minting will incur gas costs.

If you choose to do a free mint with a custom primary sales contract, your contract must inherit OperatorAllowlistEnforced.sol to ensure proper handling of royalty and protocol fees. Instructions can be found here.

Please note that when you're using custom contracts, the gas will not be paid for you under our Gas Sponsorship for Gamers promotion.

Free Claim: Direct mint to customer initiated by the customer

💡Recommended method
This is also currently a recommended method to do a free mint on zkEVM. Choosing to do this instead of launching an airdrop gives users a great front-end experience, putting them in control.

You can also create a minting experience where customers can come and "claim" a free mint, with the mint platformed in real time. To do this today, our recommended method is to use the Commerce Widget Primary Sales Flow by creating a primary sale that is priced at 0. Key things to consider are:

  • Products offered should have price defined as 0 for each product
  • Add limits to control how many can be minted per wallet address
  • Create and add to a user allowlist if necessary to reward the right players

As an alternative also, if you want more flexibility to create your own front-end, please look at our Free Mint Dapp in the Community Tool section. This tool utilises the right setup to take advantage of our Gas Sponsorship for Gamers promotion. Note that this is a Immutable community built solution, it is not supported by Immutable product teams.

Method 2: Pre-mint and transfer

💡Not recommended method
This is not the recommended method to do a free mint on zkEVM.

This occurs when a game creator (studio) initially mints assets into their collection-owned wallet(s) and then transfers (airdrops) those assets to players. While this approach allows more flexibility in the way you run your free mint (e.g. does not require a smart contract update upon a change in design), it could come at a potentially greater cost to the studio if they are required to pay both the minting and transferring gas fees for each asset.

We do not recommend executing with this method for your free mint on Immutable zkEVM. This is because whilst our Gas Sponsorship for Gamers can cover gas spend for your minting, you will need to pay gas for the additional transfer to users' wallets. Additionally, you will reveal NFT information prior to an airdrop, often concealing this until claim or drop is important.


Related content