Skip to main content

NFT Mint

Objective

In this tutorial, we are going to show how developers can host an NFT mint event on a flash layer.

At its most basic form, hosting a mint event can be a fairly straightforward process involving 3 steps:

  1. the deployment and configuration of the contracts
  2. the actual live mint
  3. the final settlement on the target layer 1 chain

NFT Mint Process

Demo Video

Here is a video walkthrough of the NFT mint process:

Detailed Steps

  1. On the dApp Portal, go to Deploy > ERC721 and deploy the ERC721 contract on the flash layer and the target L1 network (click here for the guide).

  2. After deployment, you can find the contract information under the My Tokens section.

    tip

    Clicking on the token name in the My Tokens section will bring you to the Contract Functions page, which allows you to further configure your NFT contract as needed. For example, you can:

    • set the minting price and token
    • set the minting start time
    • set the whitelist
    • pre-mint NFTs
  3. Now that you are done deploying and configuring the NFT contracts, the next thing you want to do is set up a minting portal for your NFT event. You can design your own app for this, or alternatively use the customizable mint-dapp template provided by the AltLayer team.

  4. The last thing that needs to be done before the mint is to configure the cross-chain bridge to enable rollup of your NFT mint to the L1 contract.

    important

    Bridge configuration is currently managed by the AltLayer team for all developers. If you would like to try out this tutorial with your own deployed assets, please contact the AltLayer team in Discord.

  5. At this point, you are ready for the live mint. You can start inviting your community members to participate in your NFT minting event.

    tip

    While the mint event takes place on the flash layer chain, you and your community members can use our dedicated Block Explorer to observe transactions on the chain.

  6. Upon conclusion of the mint event, you can settle your contract states onto your L1 contract by calling the rollup function via the dApp Portal. Go to the Rollup section on the portal and enter the required information:

    • Token Address - the ERC721 token address on L2
    • Destination Network - the target L1
    • Resource ID - the AltLayer team will provide this to you
    • Batch Size - 10
    • Type - ERC721
  7. Within minutes, the NFTs on the flash layer will be burned and the L1 NFT contract will be updated with the final states accordingly. You and your commmunity members can then proceed to use the L1 explorers (e.g., Etherscan) and NFT marketplaces to check and access the NFTs.

  8. Lastly, if you do not expect any more future rollups, you can disable your L1 NFT contract by calling the disableSettlement function via the dApp Portal. This will prevent the bridge or handlers from writing into the L1 contract state, in essence protecting you from any bridge hacks.