Minting
Immutable's SDK simplifies token minting for content creators, allowing them to mint tokens from their deployed NFT collections.
This guide covers the core concepts of minting and provides references to guides on how to effectively mint on Immutable zkEVM.
For a step-by-step guide on how to mint an NFT on zkEVM, including contract deployment, check out our Create game assets tutorial.
What is Minting?
Minting is the process of creating a unique digital asset on the blockchain, representing items such as art, music, videos, or collectibles. These assets have verifiable ownership and authenticity.
In Web3 gaming, minting typically refers to the generation and assignment of in-game assets to players.
Why Do I Need to Deploy a Smart Contract Before I Can Mint Tokens?
Before minting an in-game asset you must first deploy a contract to the blockchain. Smart contracts serve as blueprints for the assets they create, encompassing a range of functions that manage the collection and its associated tokens, including the ability to mint new assets.
The following contracts (commonly known as collections in the Web3 space) exist to create in-game assets:
Contract | Type | Purpose | Useful For | Token Standard |
---|---|---|---|---|
ERC20 | Token Contract | Creating fungible tokens for your game, typically traded on centralized crypto exchanges. All tokens in an ERC20 contract are identical. |
| EIP-20 |
ERC721 | Asset Collection | Creating non-fungible tokens (NFTs) for your game. Each asset has a unique token_id , and a single collection can contain different types of assets. |
| EIP-721 |
ERC1155 | Asset Collection | Creating semi-fungible tokens (SFTs) for your game. Most in-game assets are semi-fungible, making this contract particularly useful for Web3 game development. A single collection can contain different types of assets, each delineated by a unique token_id . |
| EIP-1155 |
For more information, see Immutable's contract presets. Immutable's game asset collections are fully tested and recommended for turbocharging game design on the Immutable zkEVM platform.
Minting and Gas Fees
Deploying new ERC721 or ERC1155 contracts and minting NFTs or SFTs from these contracts involves updating the blockchain, which incurs gas fees. Gas fees represent the computational effort required to process and validate transactions, execute smart contracts, and perform other operations on the network.
Gas fees serve several purposes:
- Preventing Network Abuse: By imposing a cost on operations, gas fees deter malicious actors from overloading the network with excessive or spam transactions.
- Resource Allocation: Gas fees ensure that resources, such as computational power and storage, are appropriately allocated to maintain network efficiency.
- Incentivizing Miners/Validators: Miners or validators receive gas fees as rewards for including and validating transactions, which supports the network's security and integrity.
To mint a new asset, your wallet must cover the associated gas fees. The method you choose for minting can affect the amount of gas required.
Additional Information for Minting In-Game Assets
Guide | Description |
---|---|
Minting Tutorial | A step-by-step guide on deploying and minting with an ERC721 collection. |
Minting API | Instructions on how to use Immutable's Minting API, enabling game studios to mint assets at scale easily. |
Batch Minting | An in-depth look at Immutable's preset ERC721 and ERC1155 batch minting functions. Batch minting offers faster and more gas-efficient processes. |
Blockchain Data API | A comprehensive overview of Immutable's Blockchain Data API, which indexes NFTs and SFTs' metadata for efficient retrieval and discovery after successful minting. |
Royalty Enforcement | A detailed explanation of how Immutable enforces royalties generated from secondary market trading through the Operator Allowlist. |