In programming an NFT is not an image or a gif, it’s a number that has the owner a wallet.
All we do is manage that number
For example
https://opensea.io/assets/0x80a4b80c653112b789517eb28ac111519b608b19/6236
This NFT is the number 6236
The smart contracts handling the ownership of the NFTs are ERC721 and ERC1155 (uniques and non-uniques eg: concert tickets)
In the smart contract there’s a function called tokenURI (or uri for ERC1155) , that base URI must be public and starts with https:// or ipfs://
for example for the above NFT 6236 the smart contract is is located here https://etherscan.io/address/0x80a4b80c653112b789517eb28ac111519b608b19
and has the tokenURI
https://api.cryptocannabisclub.com/metadata/6236
that link is formed by appending the token ID to the base uri (https://api.cryptocannabisclub.com/metadata/)
https://api.cryptocannabisclub.com/metadata/1
https://api.cryptocannabisclub.com/metadata/100
https://api.cryptocannabisclub.com/metadata/6236 etc
the return value from that token must be a json
{"description":"The Crypto Cannabis Club is a collection of 10k NFTokers chilling in the metaverse, growing digital weed, and competing for the title of the best grower on the blockchain.","external_url":"https://cryptocannabisclub.com/","image":"https://api.cryptocannabisclub.com/image/6236","high_quality_image":"https://api.cryptocannabisclub.com/image/6236?quality=full","name":"NFToker #6236","animation_url":"","attributes":[{"trait_type":"background","value":"ice blue"},{"trait_type":"skin","value":"fishscale"},{"trait_type":"mouth","value":"blunt"},{"trait_type":"eyes","value":"bloodshot"},{"trait_type":"hat","value":"rasta lid"},{"trait_type":"shirt","value":"23 dabs"}]}
that follows opensea standard for metadata for an NFT
You must follow 100% the opensea standard because if you don’t your token might not appear correctly there.
Guidelines:
start by hosting the tokens URI on AWS S3, or Google Buckets or via your API (do not use IPFS in the begining)
image: jpeg max 3mb (max 2000x2000x px)
if you want to include a high quality image add “high_quality_image” in the json and put there the link to the high quality image
description: max 3 sentences
Smart Contract
there are lots of things to talk about here but in short
every NFT smart contract has an owner that usually withdraw the funds from the sale of the NFTs.
the owner also can change the baseURI and assign other things like minters / prices / amounts etc.
the most efficient way gas cost way (and from others) to do airdrops is via multisend
don’t go too crazy with admin mint (transactions are public)
no one gives a shit about IPFS, decentralisation etc… with NFT they all want to sell them for a more expensive price