0. Goals

  1. Learn about fundamentals of blockchain, NFT, IPFS and smart contracts
  2. Create an NFT and deploy it to the testnet

1. Fundamentals

1.1. What is Blockchain?

In essence, a blockchain is a distrbuted database stored among nodes of computer network.

1.2. What is NFT?

NFT stands for non-fungible tokens. They are uniquely identifiable by their cooresponding metadata, and can be used as digital assets or digitally represent physicial assets. Most of the NFT markets nowardays mostly revolve around digital artwork. Note that it’s not the actual image that is being deployed to the blockchain (it would be very costly to do so!), rather, it’s its metadata which is being stored in a block.

1.3. What is IPFS?

IPFS stands for InterPlanetary File System, which is a protocol enabling storing and sharing data in a distributed file system. All digital data (e.g. text, images) comes with a hash, which is unique to that piece of data. Storing NFT artwork and meta on IPFS is much cheaper and safer (as opposed to doing so in blockchain, off-chain cloud etc.) .

For the purpose of launching an NFT, we will be storing both the images and their metadata to IPFS, and include their corresponding hash to our smart contract which will then be deployed to the blockchain.

1.4. What is a smart contract?

Smart contracts are codes which are stored in and deployed to the blockchain. It executes some logic automatically when certain conditions are met.

The smart contract will first need to be compiled into binary codes before running on the Ethereum Virtual Machine (EVM).


2. Steps to deploy images and metadata to IPFS

  1. Look for a few pictures (could be anything, really!) to be used as the NFT, save them as 0.png, 1.png, 2.png etc. in the same folder and name it as images.
  2. Create another folder named metadata. Create a 0.json file with the following codes:
{
    "external_url": "<https://github.com/elihylui>",
    "image": "",
    "name": "web3builder #1",
    "description": "web3builders are cool!",
    "attributes": [
        {
            "trait_type": "Edition123",
            "value": "123"
        },
        {
            "trait_type": "WAGMI",
            "value": "Yes"
        },
        {
            "trait_type": "SZN",
            "value": "Pump"
        }
    ]
}