16 Steps To Deploy An ERC721 Token (AKA NFT)

Orren Prunckun
5 min readNov 22, 2022

1. Create the layered image collection.

2. Decide on Project Name and Token Ticker Symbol.

NOTES: Search Etherscan or Polygonscan Token Trackers (https://etherscan.io/tokens-nft & https://polygonscan.com/tokens-nft) to sure Project Name and Token Ticker Symbol is not already in use — if either are already in use, marketplaces will add a version number to it such as “V4”.

{ “name”: “Herbie Starbelly”, “description”: “Friendly OpenSea Creature that enjoys long swims in the ocean.”, “image”: “https://storage.googleapis.com/opensea-prod.appspot.com/creature/50.png", “attributes”: [ { “trait_type”: “Base”, “value”: “Starfish” }, { “trait_type”: “Eyes”, “value”: “Big” }, { “trait_type”: “Mouth”, “value”: “Surprised” }, { “trait_type”: “Level”, “value”: 5 }, { “trait_type”: “Stamina”, “value”: 1.4 }, { “trait_type”: “Personality”, “value”: “Sad” }, { “display_type”: “boost_number”, “trait_type”: “Aqua Power”, “value”: 40 }, { “display_type”: “boost_percentage”, “trait_type”: “Stamina Increase”, “value”: 10 }, { “display_type”: “number”, “trait_type”: “Generation”, “value”: 2 } ]}

{ “name”: “OpenSea Creatures”, “description”: “OpenSea Creatures are adorable aquatic beings primarily for demonstrating what can be done using the OpenSea platform. Adopt one today to try out all the OpenSea buying, selling, and bidding feature set.”, “image”: “external-link-url/image.png”, “external_link”: “external-link-url”, “seller_fee_basis_points”: 100, “fee_recipient”: “0xA97F337c39cccE66adfeCB2BF99C1DdC54C2D721” }

3. Create the related JSON metadata for the A) collection/Smart Contract and B) each token.

NOTES: For collection metadata — collection description, project URL, royalty fee price, royalty fee payout address (if you want more than one royalty fee payout address, i.e., for multiple cofounder's, you will need to deploy a separate payment splitter smart contract prior to this point so you can add that payment splitter smart contract address as the royalty fee payout address). For token Metadata — your options are outlined here: https://docs.opensea.io/docs/metadata-standards. Looksrare wants this function in the smart contract: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2981.md via https://docs.looksrare.org/guides/faqs/what-are-royalties.

4. Check the rarity of each token attributes based on metadata.

NOTES: This is to make sure you are happy with the ratios.

5. Check how each token and related metadata will look on marketplaces for secondary sales.

NOTES: Do this before the deployment of the smart contract.

6. Validate the metadata to be compliant with marketplaces for secondary sales.

NOTES: Getting this correct first is not a fatal mistake unless it is uploaded to decentralized storage (see Step 7 below).

7. Upload A) images and B) token metadata to either centralized or decentralized storage.

NOTES: On-chain storage is too costly. Centralized can be on 1) GitHub that then pushes to fake REST API like https://jsonplaceholder.typicode.com/ The problem with this the domain is controlled by a third party. You can push it from GitHub to Heroku instead. This will appear as a subdomain on Heroku like: https://YOUR-COLLECTION-NAME.herokuapp.com/token/0. It would be worth paying the $5/month to have a custom domain on Heroku, such as: https://YOUR-COLLECTION-NAME.com/token/0 that way you can change your fake REST API later on if you want and then point https://YOUR-COLLECTION-NAME.com/ to it. Or 2) upload metadata to your domain — you’ll need to create seperate JSON files for every image in the collection and upload them all to your server. This is compared to with a fake REST API where you’d only have 1 JSON file with all token metadata in it. The advantage of NOT using a fake REST API is you won’t need to pay $5/m to Heroku to redirect to your domain. You also control all files on your server not Heroku’s. Decentralized could be on IPFS. This has no option to change metadata later on, so “dynamic NFTs” are out of the question.

8. Decide on your smart contract functionality.

NOTES: Important functions to consider are: A) What wallet addresses you want to be able to mint tokens. B) If you want auto-increment token IDs. C) If you will allow token holders to burn their tokens. D) If you want to be able to pause the smart contract so you can troubleshoot tech without any transactions going through. E) if you want a single or multiple wallets to control functions etc.

9. Write an ERC-721 compliant smart contract

NOTES: You can use A) the Open Zeppelin Contract Wizard out of the box (https://docs.openzeppelin.com/contracts/4.x/wizard) B) customize the Open Zeppelin Contract Wizard C) write a new contract from the ground-up. The disadvantage of C) the code base has not been tested by others. It is possible to delete all references of Open Zeppelin from the deployed code, but you must include the MIT licence in the smart contract code like this: // SPDX-License-Identifier: MIT. The MIT license agreement can be found here: https://spdx.org/licenses/MIT.html — The code is free of charge. It can be used without restriction — use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies. Make sure you have the last backslash on the URL in your token metadata URL. Also include contract-level metadata URI andProject Name Token Ticker Symbol.

10. Compile the smart contract code.

11. Deploy the smart contract code to your it’s unique (non-shared) address on Ethereum or Polygon testnets.

12. Verify the Smart contract code on Etherscan’s or Polygonscan’s testnets.

NOTES: This is so anyone can see what the Smart Contract does and does what it says it does. You must flatten your smart contract code and use the matching compiler version when doing so.

13. Repeat #11 and #12 on their respective mainnets.

NOTES: as long as there are no issues with testing #11 and #12 on their testnets.

14. Create a dApp that replicates Etherscan’s or Polygonscan’s Read and Write functions.

NOTES: This is to integrate into your website that will allow you (or others) to get info on token holders and for you (or other authorized wallet addresses) to mint new tokens.

15. Create a dApp that shows a leatherboard of all tokens.

NOTE: This is so you can airdrop future tokens to certain holders and holder types etc.

16. Create a dApp that upon ETH transfer to your wallet address, the dApp scans your wallet address for recent payments. If a recent payment exists, then the authorized wallet addresses mints a token to the payee.

--

--

Orren Prunckun

Entrepreneur. Australia Day Citizen of the Year for Unley. Recognised in the Top 50 Australian Startup Influencers. http://orrenprunckun.com