Polygon NFT minting guide

Introduction

This is a practical guide to create your own music NFT collection on Polygon network for less than 1 USD. You don’t even need an email address to tokenize your music.

Basics

A ERC-721 or ERC-1155 token is a simple smart contract app that has an ethereum address, and these represent NFT collections, where items correspond to a numerical ID from that contract, usually starting with zero and incrementing by one. For instance, you can search any NFT on a popular marketplace and you will find both their address and their ID at the bottom or on the URL.

NFT details on https://zora.co/collections/zora/6722
NFT details on https://zora.co/collections/zora/6722

Metadata

At this moment, most of the actual content of NFTs isn’t stored on the blockchain, this is because of blockspace demand. Generally, a blob of metadata is uploaded to another network for storage, and only its unique identifier or content hash is then added on the token. Unlike regular URLs, content hashes query information via distributed file system, not a single physical location. They allow us to keep the content available even if original host goes offline.

Cryptomedia is meant to be shared p2p, this is why OpenSea’s Polygon collections, “shared storefront” or “lazy minting” collections solely host the metadata themselves, and indeed don’t show up correctly on other interfaces. Stick to Arweave or IPFS when uploading your music files, image, and metadata.

OpenSea Shared Storefront NFT
OpenSea Shared Storefront NFT

I highly encourage people to run their own IPFS nodes and host their content themselves, not only relying on pinning services like pinata.cloud or nft.storage, which are great to spread content on the internet so it stays widely available.

Why Polygon?

From all different networks you could use for this, I suggest Polygon because I come from an Ethereum experience. This is the closest you will get to access major DeFi protocols like Aave and Uniswap, while also being able to create and trade NFTs on OpenSea with negligible costs. Every public blockchain that prioritizes transaction cost or speed also tends to sacrifice some level of decentralization and security. For instance, 80K ETH were recently exploited from a Solana bridge.

You should always research what are the security assumptions when using bridged assets anywhere. For me, Polygon is good just to get started, because you can eventually transfer your assets back to Ethereum and keep the same address and experience across web3-enabled apps. Polygon also uses proof-of-stake.

Polygon is still the most accessible Ethereum-like experience at the moment, it reminds me of early 2020.

Price floor

Owning your collection contract allows open front-ends and marketplaces (even the ones that don’t exist yet) to display it individually, with its own statistics, such as volume and floor price. It prevents your items from getting diluted in a large public collection which often display low or null floor price values, as more people are minting on them constantly. This is particularly important if you intent your media to have a market, to monetize your work with consistency.

Rarible's public collection on the Ethereum network.
Rarible's public collection on the Ethereum network.

and by the way, Mint Songs is no different! I personally would not buy multiple-edition NFTs from a shared contract.

Mint Songs public collection on the Polygon network.
Mint Songs public collection on the Polygon network.

Tutorial

For sake of keeping this guide short, I will assume you have a Web3 wallet or Metamask account on your browser.

Add Polygon to your wallet.

By default, Metamask is connected to Ethereum (mainnet) and alternative networks do not show up. You can visit chainlist.org, connect your wallet, search Polygon, and add it to your wallet. Make sure you switch the network on the top right within Metamask UI.

chainlist.org - ChainID 137 stands for Polygon
chainlist.org - ChainID 137 stands for Polygon

Get some funds

Just like Ether (ETH) is the native currency of Ethereum, Matic (MATIC) is the native currency of Polygon. That does not mean you can’t use ETH on Polygon, or MATIC on Ethereum; they exist on both networks. If you already have some ETH on Ethereum, you can swap it for Matic tokens and bridge them through wallet.polygon.network or app.hop.exchange.

If you don’t own any, you can look up for a crypto exchange that withdraws MATIC natively into Polygon network, so you avoid Ethereum gas fees altogether.

Alternatively, reach out to me, I will send you some tokens to get you started. Transaction fees are practically negligible on this network.

One of my addresses used for this demo.
One of my addresses used for this demo.

Deploy your collection

One experimental tool that works for both Ethereum and Polygon to deploy your own ERC-721 contract is wemint.art. You just need to connect your wallet, assign a ticker and a contract name. The ticker is usually displayed as the asset identifier, and the contract name is often the same as the collection name.

Using some test name example and ticker on wemint.art
Using some test name example and ticker on wemint.art

A transaction signature screen will pop-up on your Metamask and only asks to pay fees. In this case, the cost to deploy is around $0.01 USD in MATIC.

Once the transaction is sent, it can hardly be prevented from getting added to the Polygon chain, so make sure everything was intended. We just have to wait for a confirmation. Save the returned contract address for later.

Deployment successful message (wemint.art).
Deployment successful message (wemint.art).

This site defaults its messages to Ethereum, this is why you might not find anything when you click on “etherscan.io” - check your token address on polygonscan.com/token/(contract address).

Upload music file, cover image, and metadata on IPFS

Within the wemint.art website, there’s a How To tab that give you instructions to upload metadata to IPFS using pinata.cloud. These are some steps to do it by yourself:

  • Download, install, and run IPFS Desktop from ipfs.io.
  • Install IPFS companion browser extension. If you are using Brave, you can enable it on settings.
  • While running, visit the Web interface for IPFS (otherwise, the Desktop UI) by clicking the IPFS icon and then “My node”.
IPFS Companion extension: allows your browser to add and retrieve content from IPFS.
IPFS Companion extension: allows your browser to add and retrieve content from IPFS.
  • Go to Files tab, then click on + Import
IPFS User Interface / Files
IPFS User Interface / Files
  • Import a your music file (usually .mp3 or .wav) and your image file (usually .jpg or .gif) and once imported, you might want to pin them (publicly host them to be retrieved from the internet).

Formatting metadata

This is still an on-going discussion, people are working on music NFT metadata standards to make them better, keep an eye for the latest proposals so your NFTs are compatible with new interfaces. Metadata usually comes as a JSON blob, this is one basic formatting that at least displays your token on OpenSea:

{
  "name": "",
  "description": "",
  "image": "",
  "animation_url": "",
  "external_url": "",
  "attributes": {
		"artist" : "",
                "license": "",
                "label":""
	}
}

Pick any text editor, copy this format, fill in the blanks: image, animation_url, and external_url should contain links to the content: cover art image, music file, and your website (or social media link) respectively.

You could use regular URLs for the first two, but it is always preferable you use content hashes, which you copy from the IPFS application and add ipfs:// prefix on the JSON file.

Content hashes (Qm...) are below the file name, but you can also copy them from the menu.
Content hashes (Qm...) are below the file name, but you can also copy them from the menu.

To avoid errors, check that your JSON file is valid. The end result should look something like this:

{
  "name": "XEDRA - demo track 0",
  "description": "an instrumntal demo track by xedra.eth",
  "image": "ipfs://QmTNcVWy5rbq9QxKkqAUktGQkJJeZgi5B8nGSH4HGyAbGy",
  "animation_url": "ipfs://QmNihHRz3tY5gbcPPxiCMyGXWfsH87FUC7bBZLLUGeKx98",
  "external_url": "https://twitter.com/xedraism",
  "attributes": {
		"artist" : "XEDRA",
                "license": "CC0",
                "label":"DEMOTRAX"
	}
}

Proceed to save this document as a .JSON file and then add it (pin it) to your IPFS node.

metadata.json file added to IPFS node
metadata.json file added to IPFS node

Press your record!

We are coming to the last steps. Go back to wemint.art and go to the Mint tab, take the contract address that was created before, and hit Load. You should see a similar screen:

You guessed it, that's where the metadata.json content hash goes.
You guessed it, that's where the metadata.json content hash goes.

Before rushing into mint, don’t forget to add the ipfs:// prefix just like the URLs of your music and image files in the JSON file. Once you mint there is no way of deleting this content from the blockchain, and remember IPFS is a public network. Make sure everything is as intended.

Royalty share can be set up, this is how much revenue from a secondary sale goes back to your address. I personally like to keep this number low.

Minting here costs a cent!
Minting here costs a cent!

Hit confirm and wait for the transaction to get added on Polygon. It might take some time for OpenSea to show up your NFT even after it gets minted, be patient!

Again, this screen says etherscan.io when it should be polygonscan.com
Again, this screen says etherscan.io when it should be polygonscan.com

Find and list your token.

If everything went correctly, you can search for it on the top bar, it is your contract collection name that will show up, initially with 0 items.

Alternatively, find it on opensea.io/assets/matic/(contract address)/0 where the last 0 is the token ID. The next NFT you mint on this contract address will have token ID 1, and so on incrementally.

It might take some time for front-ends to display the actual content, partially because you might be the only person hosting it. Use pinata.cloud or nft.storage to pin your content with better bandwidth. Once you do that, hit the refresh metadata 🔃 button at the top right.

title, description and attributed loaded correctly but there's no music or artwork yet.
title, description and attributed loaded correctly but there's no music or artwork yet.

I waited 15 minutes after seeding the metadata on different places, hit the refresh button several times, and then everything showed up correctly!

Go listen to this demo, I actually really like it lol
Go listen to this demo, I actually really like it lol

If you log in to OpenSea with the same address you created this NFT, you will see that you own it, and you can list it on sale.

Listing screen after clicking "Sell" once you log in with the owner account.
Listing screen after clicking "Sell" once you log in with the owner account.

Conclusion

Some things to consider:

  • You are responsible for keeping your content available. Try to seed it by yourself and other places so it doesn’t take a lot for people to listen to it.
  • Polygon is filled with spam. This is a problem every low-cost blockchain faces right now. Make sure you present your NFTs in a legitimate manner over social media, keep up with the metadata standards, make your work meaningful to stand out.
  • Polygon lacks traction. I’m presenting this guide in hopes more people give it a try, as creators, collectors, and developers. Many don’t have access to mint something on mainnet but this technology is parallel and still works to distribute resources no matter how big or small.

A middle ground between the art market and “Bandcamp friday”.

You might still be skeptical around this whole NFT thing, especially with things being so costly, but think about it just like any other option to publish and monetize your work. One that is much more frictionless and borderless. Since this is a low-cost blockchain (where we don’t make margins for transaction costs) you might just sell your NFTs for the same amount of money you would get on a Bandcamp Friday.

There’s no need for Bandcamp Friday anyways because you can tip artists to directly. Polygon is just as fine as Ethereum to trade NFTs and more. Participate (or create) digital organizations, take advantage of financial protocols, generally just toy around it like I did when Ethereum was affordable.

If you followed this guide to create your music token, share it with me!

Subscribe to xedra
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.