It's my bf's birthday so I put him on the blockchain

Here’s the Opensea collection: Ah, my bf is so cute.

I’ll post my contract and the python file I wrote for generating JSON files. But since this is not a tutorial, it’s not going to be in detail.

In short, August 21st is my boyfriend’s birthday, so I decided to drop him an NFT collection featuring all the pics I took for him and matching each of the pics with an emoji (he is really a drama king at least in terms of his facial expressions haha). We had so much fun just discussing this idea. “Oh yeah, and you can never break up with your bf/gf now because it’s on-chain, we all know when something is on-chain it’s non-removable.” “You can make a reverse business where you can blackmail people and be like if you don’t pay me your coins your pics will be on-chain.” etc.

I never buy into NFT more than what it promises. Of course, I have bought some NFTs that I regret (and 99% of them are still Ponzi), but as I get to know more about how to make NFTs, I cannot help but think about how to make demystify NFTs, and make them cheaper and more fun. For example, I made a one-click generate random NFT button in Unity in Polygon. And I also did some experimentation with NFT ticketing. There are a lot of cool ideas you can do with NFT, I just feel that I don’t have enough time to implement them all and still need to figure out my priorities and where to get my funding.

Anyways. Here’s the smart contract. The logic here was so simple. You can, of course, replace the number 28 with the number of NFT in your collection.

//SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract Jmoji is ERC721URIStorage {

    constructor() ERC721("Jmoji", "JMEOW") {}

    function mint(address user, string memory baseURI) public {
        for (uint256 i = 1; i <= 28; i++) {
            string memory tokenURI = string(abi.encodePacked(baseURI, Strings.toString(i), ".json"));
            _mint(user, i);
            _setTokenURI(i, tokenURI);
        }
  }
}

Here’s just a python helper function for generating the JSON file for each of the IPFS images. You can also make variations for the name of each image using the same logic as the image one.

import json;

dictionary = {'name': 'Jmoji', 'description': 'Sending Love to the 30th birthday for Jmill', 'image': ''}
baseurl = 'ipfs://The IPFS Hash of your image folder'
for i in range(1,29):
    textfile = open('json/'+str(i)+'.json', 'wt')
    dictionary['image'] = baseurl + '/' + str(i) + '.png'
    jsonString = json.dumps(dictionary)
    textfile.write(jsonString)
    textfile.close()
    print(i)

Btw, as for my vegetable garden, the greens are growing fast

After leaving the corporation, I start to become more creative, and more fun. The busy city life didn’t really intrigue me that much anymore. Whether or not finding a socially recognized job is not my priority anymore. Right now my career goal is to own 10 houses in FL before 35 so I can just get all my passive income through rentals. Or whatever can help me reach financial freedom before 35 fast, the idea is open. I want to be able to spend a lot of good time with my loved ones and explore places around, and I care a much more about my happiness, living in the present, and well-being than anything else.

Subscribe to Lucy Qiu
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.