What’s an NFT?
NFT stands for Non-fungible token. “
Non-fungible” more or less means that it’s unique and can’t be modified or replaced with something else.
If you have a dollar bill you can exchange that dollar bill or another one and you still have one dollar, both bills are equal and can be exchanged. If you have an original Pablo Picasso painting you can’t exchange that for anything else, there’s nothing else in the world that can equal that original painting, that’s what an nft is.
NFT’s are on the ethereum blockchain but what even is a blockchain?
A blockchain is a type of database but instead of all of the data being stored by one centralized computer or server, the data is distributed or decentralized into blocks of data onto many computers these blocks are chained together hence blockchain this is what makes blockchain technology so great the data is owned by the citizens instead of corporations and data monopolies.
The data can be anything but is generally used for transactions and ledgers, everything on a blockchain is transparent, anyone can see anything but it’s because of this transparency that it’s super secure, there’s no one computer or corporation that can manipulate or modify the data each computer or node must be verified by others and this makes blockchain the most secure way to make transactions today.
Most people think of artwork when you mention nfts, but an nft can be just about anything because it’s basically a proof of ownership. Nfts can be used for unique items in games, for videos, music event tickets, real estate deeds or any type of contract. There are so many use cases and the sky is the limit. Even tweets have even been sold as nfts. You can create a single nft and that’s fine for some use cases but you’ll find many examples of collections of nfts that are like trading cards, each is unique with its own attributes some common and some super rare and there are many communities that are built around these collections.
First steps in creating an ENTIRE NFT Collection (10,000+)
Now we are going to look at creating an nft collection of 10,000 unique images. You might think this would take an eternity, but it doesn’t.
How do we do this?
This is how most nft collections are created and there are many applications that you can use to accomplish this such as photoshop procreate on the ipad or the recommended figma.
Figma is one of the easiest and best solutions because it is a free program available in the browser and it’s vectore-based so when you resize a vector-based image it won’t pixelate but you can use whatever you’re familiar with and you have access to, this is not going to be a figma tutorial
Images for our NFTs
What you need is to name your collection and create a main character that will be on each of your NFT a few layers and for each layer you should drawn different features you should start with the furthest layer which is the background, on which you should have some solid colours and some other custom backgrounds as options, now think about this all these layers that you create will have options that you’re going to use to make unique images, some options will be more common and others super rare.
After you have created all of the layers export each layer as a png image Now a png is important because it will keep the layer transparent, it will allow you to overlay images on top of each other it is also very important that each layer is the same size as the whole image and you should think about the size of your images in advance you can choose for example 1500 by 1500 pixels For more details on how to export layers correctly check some videos on youtube which describe the steps for Photoshop or Figma. As for layers, you will have to create your own, if you are not an artist, give it a try, there is certainly a bit of creativity in you, maybe you will also discover your new talent, and if that is not your thing, hire an artist or collaborate with one.
Download Repo & Set Up
Now it’s time for the fun part – creating unique images It would take forever to manually create 10,000 images from all those layers, so you are going to use a great open source app called hash lips art engine. that will allow us to generate our images. You will also use another repo and which will allow us to upload our files and metadata to ipfs, create a contract and knock out our nfts, you will get to all that in a moment but for now you willll generate our images using create 10k nft collection repo. If you don’t have a github account, set one up, it’s completely free. There is the link to register on github and the link to the project repo below, so go ahead and register if you need to and then open the link to the repo.
Sign Up on GitHub – Here
Create 10k nft collection Repo – Here
After opening the repo. At the time of writing this article the current version is 2.0 to make sure everything works the same for you go ahead and download the same version, just click on releases and under version 2.0.0 download the zip file under assets after downloading the file unzip it, also remember to read the readme file there is helpful information on how to use the project and common problems and solutions if there is a newer version there will be instructions on how to use the newer features in the readme file
Now there are two other applications you will need to install, node.js and visual studio code
For node.js go to nodejs.org to download and install the version appropriate for your operating system it’s completely free.
And you will need a code editor for example visual studio code so go to code.visualstudio.com to download and install the version appropriate for your operating system.
Now open the folder you just unzipped in the vsc program. You can do it in the upper left corner in the program vsc, click on file. And then open folder. And then select your unzipped repo folder.
The first thing that you will need to do is install the dependencies for this project and to do that you will need to open the terminal so go to terminal at the top of vsc and then select new terminal
This is where you’re going to use node.js, to make sure that you have nodejs installed properly type node v to see what version is installed on version 16.13.1 everything works fine but mac m1 users are having issues with this version and version 14.18.2 might work better for m1 users for more details check out this issue on the hash lips art engine repo which outlines the steps needed to get it working with an m1 processor
So in the terminal type npm install or the shorter command is just npm i. This will get everything installed that you need for this project to work, after that you can test out the generator by typing npm run generate. This will use the demo image layers that are included with the project. It’s going to generate five unique images based on the layers in the layers folder and these images are created in a folder called build
Notice that along with the images also have json files these are data files that define what properties are contained in the related image these will be used during the nft minting process to define each attribute or property on each image the attribute names come from the layer image file name
Include your Images here!
What are you going to do now is changing out example images with your own images under the layers folder delete everything and copy in your layer images
Each layer should be a folder and each layer option is an image in that folder and again these are layer images that you’ll need to create or partner with an artist to help you create them for your layer image names be sure to name these as you want them to show up on opensea
Remember each layer is a property of the image and they’ll show up on opensea. Also the generator doesn’t like special characters like dashes to be safe just include letters numbers and spaces. To define rarities for your layers, edit each layer option file name at the end of the file name add hashtag and then a number, this is the only special character that is permitted, there shouldn’t be any spaces before or after the hashtag, this number is a weight that can be given to each option if you want something to be very rare you could add hashtag 1 and for something very common hashtag 100 or even 1000. These don’t need to add up to 100 they’re just arbitrary numbers if you would made all of them hashtag one then they would all be weighted equally
Now under the source folder or src, open the config.js file now this is the only file where you’ll need to make any changes. This file contains all of the configuration details for your nft layers, your contract details and your minting details.
To generate your files, first update the name prefix and the description, you should do some research before naming your collection, make sure that the name isn’t already taken on opensea. If you create a collection with the same name as another then it’s going to show up as whatever your collection name is v2 and you don’t want version 2.
So next we need to define our layers under layer configurations first how many images do we want to create let’s change grow edition size 2 to 20 for testing but change this later to 10 000
under layers order change these out for your layer folders that you copied over. be sure to order these correctly, the first layer needs to be the furthest background layer and the last layer needs to be the closest foreground layer.
These are going to get layered on top of each other so if you have any issues here be sure that you’re using png files with background transparency and that each layer is the same size as your overall image if you’re only seeing the last layer then your images don’t have transparency enabled if your layers are jumbled that means that your layer sizes are not all the same and the next piece to edit is the format.
This is the size of your resulting image in pixels this is completely up to you but be sure that you think about this ahead of time if your layers are 100 by 100 and you set this to 1000 by 1000 your images are going to be blurry or pixelated so you should set this to the same size as your images
Now the last thing you need to change before generating your images is the extra metadata field, if you don’t have a landing page or an external url that you want to be included with your nft you can include thatin extraMetadata field. This will show up in your nft details on opensea. If you don’t have an externa url to include you can just remove this whole line.
There are a lot of other advanced configurations that you can do with this engine like create gifs use blending modes pixelate images and much more.
Generate 10k Unique Images!
Go back to your terminal and write npm run generate again now you will get 20 images along with their metadata. This is the time to check your images and metadata to make sure that everything looks good make sure that there’s nothing weird looking in your images and make sure that everything in the metadata looks good and there’s no misspellings. Once you’re happy with how everything looks go back to the config.js file and change grow edition size 2 to 10 000 or however many images you want to include in your collection. Depending on your system this could take a while to generate it can take even several hours.
The complexity of creating NFTs
Now that you have images and metadata you’re ready to start creating your NFT’s this is where most tutorials stop and most people get confused and give up.
you see usually you’ll need to know programming technologies like solidity web3js ipfs and others to create nft collections, you have to first deploy a contract and then upload your files and your metadata and then mint each nft. This process could take weeks to learn but there’s an easier way you can do it.
It can be done with a platform called nft port. They make this entire process very easy. Nft port costs so if you were to mint 10 000 nfts from the start that would cost you 49 for a month of the growth plan and then 0.075$ for each of the extra 9400 mints which would be 705. 49$ + 705$ = 754$ so my thinking is so go ahead and mint your 100 free nfts and when those sell take the proceeds to fund minting more. 750$ after selling a 10k collection is nothing.
So to get started with nft port go to nftport.xyz to get your free api key. But first you need know how to create your contract and incrementally mint your nfts let’s do anything on the blockchain You’re going to need a wallet. the best is metamask, download and set it up if you don’t have already your wallet. At First download and setup your MetaMask. like in this link: Setup Metamask It will just allow you to assign ownership of your collection and nfts to your personal wallet.
NFT Port settings in config.js
Go back to the config.js file in visual studio code and edit the nft port details there’s a required section and an optional section in the required section you’ll need to enter your api key in the AUTH variable LIMIT is your rate limit this is the amount of requests that you can send every second the free plan is two requests per second so just leave that Your CONTRACT NAME should be the same as you entered under name prefix for the SYMBOL it’s like a stock symbol it should be a shorter version of your collection name for contract type and for the MINT TO ADDRESS this should be your meta mask wallet number you can open up metamask and click on your account to copy your wallet number a CHAIN is the blockchain that you want to deploy to. The current options are rinkaby and polygon. Rinkaby is the test network and polygon is the main network use the rinkoby chain to test everything first that’s what it’s there for if you make any mistakes then it’s not a big deal but mistakes on polygon can’t be undone now once you’ve tested everything you can come back and change the chain to polygon and run your mints again and you’ll step through that process. The next option is METADATA UPDATABLE if you want to do a reveal where you have an initial generic image and metadata and then reveal the real image and metadata later, you’ll need to set this to true if it’s false then once you mint an nft it’s locked and it cannot be updated. Some advanced planning is needed.
Nft port added functionality for on-chain royalty support that means that your contract will collect royalties from any sale no matter which marketplace it’s sold from. You just need to include your royalty share which is the percentage of the sale price that should go to the royalty address now this is in basis points so 100 basis points would equal one percent so if you would put one thousand in here that would be ten percent, and next you need to include your royalty address this is the address that will receive the royalty.
Next you have several optional settings if you have an nft port contract that you’ve already deployed and you want to use that, then you can enter that here otherwise get this address in a bit when you create your contract. The generic settings only apply if you’re doing a reveal this will be the metadata that shows before the real metadata is revealed. You can change the title description and generic image or images that you want to use pre-reveal. The generic image is an array you can include multiple generic images by separating them with a comma and one will randomly be added to each nft pre-reveal. The reveal prompt setting enables or disables a prompt that will confirm that you want to reveal an nft before it actually performs the reveal and then interval is a setting that the reveal function uses to check for sales every period of time this is in milliseconds so 900 000 milliseconds is 15 minutes so every 15 minutes it will check for a sale and then reveal the sold nfts if that’s the strategy that you go with.
Create Generic Metadata (optional)
You need to decide if you want to do a reveal or not if you are you’ll need to create your generic metadata to do this just be sure that your configuration settings in the config.js file are correct particularly the ones for the generic info and then from the terminal run npm run create underscore generic now you’ve got your real metadata in the json folder and your generic metadata in the generic json folder
Upload Images and Metadata to IPFS
The next step is to upload your images and metadata to IPFS. IPFS is an industry standard for decentralized storage, you could just use google drive or any other online file storage and that would work but it’s centralized storage and defeats the purpose of decentralization.
Fortunately nft port has this all worked out for you it’s really easy to upload these files, to upload your images from the terminal. Type: npm run upload_files depending on how many you’re uploading this could take some time the free plan is limited to two requests per second.
After uploading an image the metadata is updated with the ipfs linked to the image.
To upload your metadata from the terminal. Type: npm run upload_metadata again this could take some time depending on how many you’re uploading if you’re doing a reveal this is going to upload your real metadata and your generic metadata this will result in a new ipfs metas folder in your build directory and an ipfs meta’s generic folder if you’re uploading generic metadata too
Now you need to create your contract, again make sure that all of the nft port settings in the config.js file are correct and then from the terminal run: npm run deploy_contract after that runs, your contract will be deployed on the blockchain chosen.
It can take a few minutes to deploy next you’ll need to retrieve your contract details, to do that from the terminal run: npm run get_contract if the contract is still deploying this might fail but don’t worry just give it a few minutes and try again once you see contract deployed successfully you’re ready to move on. You’ll see a new folder called contract in the build directory that contains the transaction details for the contract deployment.
Now it’s time to start minting your nfts.
To mint from the terminal run: npm run mint but there’s some options with this command, you can include two optional flags –start=1 and –end=100 these indicate the addition numbers that you want to start and stop minting from if you don’t include any flags all available nfts will be minted until you hit the limit for your nft port plan if you only want to mint 1 through 100 you could say start equals 1 and end equals 100. now if you only want to mint a single nft you can start and end with the same number so you could say start equals 10 and end equals 10 then, only addition 10 will be minted if you want to pick up minting at a specific number and continue on from there you could just include the start with no end so you could say start equals 10 and it’s going to start with 10 and continue on until you reach your limit. Now as nfts are minted the transaction details will be added to a new folder in the build directory called minted this process creates transactions to mint the nfts you still need to check the transactions because it’s possible that some will fail and this is just the nature of the blockchain
This article is for educational purposes only. Author can’t be responsible if something goes wrong if you have any suggestions on how to improve the code please open a ticket or submit a pull request on github. Using this article you do everything at your own risk
Check Mint Transactions
To check your mint transactions from the terminal run npm run check_txns that stands for transactions and this one has a flag as well. This one is –dir it stands for directory you’re going to tell it which directory to check because you could run this on your minted directory and later on you’re going to run the same command on your reveal directory so say directory equals minted like that –dir=minted and this directory flag is required for this command. Transaction can be in several stages it can be indexing pending failed missing or successful. If a mint transaction does not succeed you can attempt to mint that nft again so don’t worry the easiest way would be to try that edition specifically so you could run your mint command again and start and end with that edition number and then after that run then check again now you should start seeing your nfts show up on opensea if you’re testing on rinkeby go to testnet.openc.io to find your collection for polygon it’s just opensea.io and as long as you’re logged in using your metamask wallet the same one that you created your contract with you should see an edit button on your collection, which allows you to set the details of your collection, these details are specific to opensea you can change the description the image set your royalties etc.
Okay so that’s the entire process now there are several strategies that this can work with pick your strategy plan it out test the entire process on rinkaby and then start it again on polygon for real now to do that you don’t need to regenerate your images or metadata and you don’t need to re-upload your files or metadata either first rename the contract minted and revealed folders to anything else maybe just append test to the end of them next update the chain and the config.js file to polygon then create a new contract by running npm run deploy contract and then get your contract details by running npm run get_contract then mint your nfts on polygon.