Skip to main content

8. Create and deploy NFT (ERC721) contracts

Now that the metadata is ready, you will create and deploy NFT (ERC721) contracts for the Immutable Runner fox and skins.

Set up an admin wallet

You will need an admin wallet to pay for gas to deploy smart contracts.

  1. Download the Metamask browser wallet and follow the steps to store your seed phrase in a safe location.
  2. Go to the Immutable Hub and click on your Passport client.
  3. Click Connect Wallet in the top right corner, select Metamask and follow the prompts to connect your wallet.
  4. In the Faucet tab, click Use connected wallet address.
  5. Click Receive 10 Test-IMX.
Connected wallet faucet
  1. You now have Test-IMX tImx to deploy smart contracts.

Deploy contracts using Immutable Hub

Using the Immutable Hub, you can easily create and deploy NFT contracts for the fox and skin tokens using the Immutable ERC721 preset contract.

  1. In the Collections tab, click on the Deploy contract button.
    • Create a Name for the fox NFT collection: Immutable Runner Fox
    • Create a Symbol for the collection: IMRF
    • Copy the base URL for the fox NFT from step 8 and paste it into the Base URI: https://immutable-runner-json-server.onrender.com/fox/
    • Grab the NFT collection metadata URL from step 8 and paste it into the Collection Metadata URI: https://rose-ministerial-termite-701.mypinata.cloud/ipfs/QmSjuGnQouy3tXTxYTNSMW9ft1GnTqFaXUTDrGk8L3LJzn
    • Enter the admin wallet address you created earlier as the Royalty recipient address.
    • For the purpose of this tutorial, set 5% as the Royalty fee.
    • For the minter address, let's use your admin wallet address. To do so, click on the Use connected button.
  2. Click Deploy Contract.
  3. If your admin wallet is not connected to the correct chain (i.e. IMX zkEVM Testnet for this tutorial), you will receive a prompt in Metamask asking you to switch. If prompted, click on the Switch Network button.
Metamask switch network
  1. To deploy your contract, which will require gas, you must sign a transaction with your wallet. Click Confirm to proceed.
Metamask sign to deploy
  1. You'll then be asked to sign a message with your wallet. This gasless step will link your collection to your project's environment. Click Sign to complete the linking process.
Metamask link collection
  1. Finally, you'll need to sign one more transaction with your wallet, which will cost gas. This step will assign your admin wallet the minter role, allowing it to mint tokens in the collection. Click Confirm to grant the minter role.
Metamask grant role
  1. You have successfully deployed your Immutable Runner Fox NFT contract.
    • To view your deployed contract, click the Block Explorer link.
Hub Immutable Runner Fox

Repeat the steps for the skin NFT collection.

  • Name: Immutable Runner Skin
  • Symbol: IMRS
  • Base URI: https://immutable-runner-json-server.onrender.com/skin/
  • Collection Metadata URI: https://rose-ministerial-termite-701.mypinata.cloud/ipfs/QmXAzthu432TaeUvwmPcva9C2eTzdXGRHEMVrUTRfRCrRw
  • Royalty recipient address: Your admin wallet address
  • Royalty fee: 5%
  • Minter Address: Your admin wallet address
💡Manually deploy contracts
Instead of using Immutable Hub, you can launch your contracts via code by following the steps here.

IMX Whitepaper IMX Tokenomics Block Explorer Careers Contact Us