Introducing Emoji Garden NFT

Christian Montoya
5 min readOct 6, 2021

--

An emoji-filled data primitive you can mint on Ethereum

I was inspired by pure on-chain data primitive NFTs like Loot, Adventure Cards, The N Project, The Colors Project and 256ART to create a genesis project that will be the basis for future projects I plan to build. I chose emoji as the conveyance because I love them and it’s cool to see them in SVGs. Here’s a rundown of how I did it, what you can do with them, and what I plan to do next.

The Contract

Every contract needs to have cool ASCII art like this at the top

You can view the full source code for Emoji Garden on Etherscan at 0x690dbdf6bb1712f01b34e80c25553db869df8bf9. The contract is published under an MIT License. It is based on a combination of Loot, Buddy Tags, and some example code I found for minting NFTs, along with my own functions for generating pseudo-random grids of Emoji. You can use it for your own projects, or just browse through and see how it works. I learn best from looking at code, and one thing I realized in this process is that learning Solidity isn’t so scary after all. Maybe you can learn too!

There are some things I probably could have done better, but I am happy to report that so far, my first contract has not had any breaking bugs.

The code that generates the Emoji grid is in tokenURI. The output is returned as an SVG with the Emoji contained in plain text. There are also contract functions for returning the 9 emoji that make up the grid as a plain text string (emojiString) and for returning the single emoji in each spot in the grid (emoji1emoji9).

I ask and the blockchain answers…

Thus, if you use Emoji Gardens as a base data layer to build your own projects, you can query the contract, gas-free, for the base data itself. You could, for example, build a game with a random number generator that gives numbers from 1–9, and then query the emoji at that slot to determine the outcome of a game event. Or you could create a generative art algorithm that uses the emoji + their locations as input data. The possibilities are endless!

Emoji Garden “Rarity”

The most obvious rare trait for each garden is the occurrence of certain emoji that are less common. For example, a 🐝 or 🍄 is more rare than a 🌼, and multiple occurrences of uncommon emoji will be more rare to find. However, there are other traits that may be less obvious.

One is what I call a “bingo,” which is a row, column, or diagonal of 3 identical emoji.

Garden #4 has two bingos

A garden could also have a square of 4 identical emoji, which is also uncommon.

Garden #75 has a sunflower square

Another trait is symmetry. Symmetry can be horizontal, vertical, diagonal, or perfect. So far, no gardens with perfect symmetry have been minted, but I’m sure at least one will appear soon.

Garden #41 doesn’t have any rare emoji, but it has horizontal symmetry which is hard to find

Then there are traits that are similar to Poker hand traits, like having 2 pairs, a pair and a triple, etc. The way this works is you can discard the common daisies and sunflowers and look at the occurrences of other emoji.

Garden #91 has two pairs, the chestnut and the hibiscus

Lastly, there are various combinations or sets of emoji that can be rare. For example, there are 5 animal emoji that can appear, and having 1 of each would be very unusual. So far, there is only one garden, #42, with 3 distinct animals, and that’s the current leader for an animal set.

Garden #42 *also* has an adjacent pair of tulips!

The varied rarity of the possible emoji, and the added element of the layout, enables all kinds of additional information beyond data primitives that may feature just random values or just random visual information. Future projects can choose which of these traits to use as their input!

You may notice that the visual style of the gardens pictured changed along the way. That’s because Emoji Gardens use the native Emoji icons in the OS or application where they are being viewed. The first image is from MacOS, while the rest are from Windows.

What’s Next

Emoji Garden is my genesis project — the basis for other projects I plan to build. Each garden is a claim to future NFT projects. I don’t want to give away too much information about what I plan to build, but some projects will be claimable only by Emoji Garden holders, while others will have a reserved quantity for Emoji Garden holders + a public mint supply for anyone. I also plan to do at least 1 airdrop for early holders of Emoji Gardens, as well as giveaways when the project reaches key milestones, like 100, 200, 300 minted and so on.

It’s also possible that other devs / artists will want to build on Emoji Gardens, and I’d love to hear about anything that anyone is working on, support creators, and share with the community as it grows.

It will take time to get to the vision I have in mind, but I’m going to work on it!

For now, here’s what you need to know:

Thank you for reading!

--

--