Skip to main content
Tutorial
Beginner

How to create a one-to-many NFT collection

If you want to mint more than one edition of your NFT, you'll need to create a smart contract using an ERC1155-flavored template.

When minting an NFT collection, you make multiple identical editions of the content. This is one type of collection. Multiple digital items will be issued. They will feature identical content with a different, unique token ID for each NFT. In this case, you will have a unique token ID for each digital item issued with its unique data.

You will need:

  • a wallet to fund the creation of your contract
  • the URI of the metadata of your collection Read more.
  • the URI of the content of the NFT. You can upload your file on IPFS. Read more.
  • the address of the initial owner
  • the network on which you want to deploy

In this tutorial, we will:

Deploying the smart contract

This is where we use the values we've listed earlier:

  • Name: "My first NFT collection"
  • Description: "This is my first collection of NFT "
  • Definitive Name: "myFirstCollection"
  • Initial Token URI: the link to the content of your NFT
  • Initial Contract URI: the link to the metadata of your contract
  • Initial Owner of Multi Sig Contract: The address of the owner of the contract
const axios = require("axios")

const axiosInstance = axios.create({
baseURL: "https://api.starton.com",
headers: {"x-api-key": "PUT HERE YOUR API KEY"},
})

axiosInstance
.post("/v3/smart-contract/from-template", {
network: "",
signerWallet: "",
templateId: "ERC1155_META_TRANSACTION",
name: "My first NFT collection",
description: "This is my first collection of NFT ",
params: [
"myFirstCollection",
"", // Initial Token URI
"", // Initial Contract URI
"", // Initial Owner of Multi Sig Contract
],
speed: "average",
})
.then((response) => {
console.log(response.data)
})

Minting the first NFT of your collection

You will need the following information:

  • Wallet: the signer wallet
  • To: the wallet receiving your NFT
  • Id: the identifer of the NFT within the collection
  • Amount: amount to mint
    const axios = require("axios")

const axiosInstance = axios.create({
baseURL: "https://api.starton.com/",
headers: {
"x-api-key": "PUT HERE YOUR API KEY",
},
})

axiosInstance.post(
"/v3/smart-contract/polygon-amoy/0xc900546AA43C88aBcAF70c20448DF45917c8363A/call",
{
functionName: "mint(address,uint256,uint256,bytes)",
params: [
"", // the signer wallet
"", // the receiving wallet
"1",// the ID
"1" // the amount
],
signerWallet: "",
speed: "average"
}).then((response) => {
console.log(response.data)
})

Loubna Benzaama

Lead technical writer


Created:

March 18, 2024

Reading time:

5 min


Content
  • Deploying the smart contract
  • Minting the first NFT of your collection