NFT outlook, Part 2

Ortomich
4 min readJul 25, 2022

--

Hello everyone! My name is Tom!

Today I will continue to tell you about nft

Let’s start

In the last article, we analyzed the NFT, what they are in general and how they are displayed in the blockchain, this was an introductory article so that everyone understands what is happening in general. Now we are starting to dive into the world of nft metadata!

Why did I get into this?

About a week ago, a link to this NFT was thrown into one good chat and the world turned upside down for me at that moment! How am I playing the game right now on OpenSea???

As a result, I decided to do something similar, while moving towards this gradually (that’s why I made 3 collections) + I wanted to do it as cool as possible, that is, on-chain, so the task was interesting!

Cellular automaton

This collection can be found here — CLICK

This was the most difficult collection for me, since I still didn’t really understand how to push a js script into nft, which Data URLs to use, and so on. After I played with metadata and understood how it works, I tried to look at it all on OpenSea, but my nfts were not there, OpenSea simply did not see my nfts, although all the metadata were correct! At this point, I turned to @spiridono, more experienced in these matters, who pointed out the mistake to me and threw off this wonderful link CLICK, with which I can fully understand the possibilities of nft

The main information from this guide is presented in this table, and if you read each item, you will surely understand my surprise)

What was the most important thing for me here? Yes, the fact that I shoved the html + js page encoded in base64 into the “image” field, but it does not support such a format, it all had to be shoved into the “animation_url”, where it all would have taken root perfectly

As a result, having made this nft collection, I realized several important things:

  • Data URL
  • Metadata for OpenSea
  • Field “image” = picture when you are on the collection page; field “animation_url” = picture when you clicked on a specific nft
  • You can stuff a lot of things into this metadata

Interactive 3D

This collection can be found here — CLICK

At this stage, everything already seemed very simple, I took Three.js, stole the code of the first instance I liked there, redid it a little (made imports through https://cdn.jsdelivr.net) and that’s it! In the code itself, the camera script was originally written through this library, and it works even on OpenSea!

What conclusions did I draw from this collection:

  • You can import any libraries in general through cloud storage (yes, not super on-chain, it is the lesser of evils)
  • You can very simply make an interactive nft, after clicking on which something will happen

Snake

This collection can be found here — CLICK

Well, I have already approached this collection with experience and knowledge, so nothing foreshadowed trouble. I found a js snake on GitHub and decided to make nft of it. After I deleted some functionality, I try to deploy the nft contract to the network, but it does not fit in size, and then the fun begins with rewriting the entire contract on erc721A, deleting some functions from erc721A, incredible gas management (I have never been so worried about it) and as a result — deploy a contract on a test network with a gas limit of 5.500.000!

What conclusions were made after this collection:

  • Pushing even 400 lines of js code on nft is possible
  • In practice, I checked that almost everything can be put into nft
  • Js code needs to be obfuscated)

Here I will leave a link to the repository, where all 3 contracts and all html pages that correspond to them will be located

I hope the article was interesting and understandable!

  • My Twitter
  • My GitHub
  • Support (any EVM networks): 0xd661909C7537D090af9fC3b3Fedf8f46BE60AfAc
  • Thank you! ❤️

--

--