Intro to NFTs?

Non-Fungible Tokens (NFT) OwO?

Nyaa~ Lets goo heh
Nyaa~ Lets goo heh

Hello hello~ Welcome to my second ever article guide thingy with some smol help from @deor :) I still don’t know what to call these thingies ahaha.

If I miss anything important whoops I might add it in? maybe or maybe not depends on if I have time or nots

Welcome~
Welcome~

What are these Non-Fungible Tokens you speak of?

An NFT is a unique token that a smart contract says you own - Big brain Deor

You might have heard these terms before If you didn’t then here you go (These definitions might not be 100% correct BUT they should grasp the overall meaning)

  • Non-Fungible Tokens (NFTs)
    • ERC-721, ERC-1155, ERC-20 (Wow fancy techy term definitions also by big brain Deor)
      • ERC-721 - 1/1 NFT Standard for Unique Art
      • ERC-1155 -  NFT which isn’t unique
      • ERC-20 - NFT with isn’t unique and it’s divisible and all tokens on Ethereum are ERC-20~
  • Smart Contracts (Which I won’t get toooooo in depth with)
  • Rugs
    • Basically long story short, you buy into a project and then the devs abandon ship and leave the project to die.
    • You see this happen quite a lot in NFTs and small altcoins
  • Honeypots
    • A dreadful thing that people could do, basically honeypots are smart contracts that appear to have a design issue that allows an arbitrary user to drain Ether
    • Scam~
  • Opensea/LooksRare/Foundation
    • NFT Marketplace
Knowledge Is Vast~
Knowledge Is Vast~

Smart Contracts

If you want to look into a simple code portion of a smart contract, if not you can skip :P

Woaw much smart contracts

Smart contracts can be coded/tinkered to whatever you desire be it a chess game (https://fiveoutofnine.com/contract ← Chess game code) or NFTs

I’ll be mostly touching on NFTs as I'm too lazy to talk about other things anddd that this article guide thing is about NFTs haha.

A picture to bless your eyes~
A picture to bless your eyes~

You can take a look at Tubby Cat’s Smart Contract as that’ll be our example for this article or not that's up to you since this is the technical sides of these things  https://etherscan.io/address/0xca7ca7bcc765f77339be2d648ba53ce9c8a262bd#code

If you have the Etherscan with Tubby’s Smart Contract open, you might be severely overwhelmed but if you look closely and ignore the “big techy” words you should be able to understand the code as it’s pretty much English~

Let's take a smol look at the code~

Go to File 1 line 111 with the function “mintFromSale” (Won’t explain all of the function~)

mintFromSale Function
mintFromSale Function

This might look very confusing but it’s not soooo let's walk through this together line by line :3

(One of the more easily understandable functions)

Line 111 - “function mintFromSale(uint tubbiesToMint) public payable” 

LINES 111 EXPLAINED:

  • So this function is called mintFromSale
  • The brackets “(uint tubbiesToMint)” is the user’s inputted desired amount of Tubbies they want to mint
  • Public tells us that the function is public for internal/external use
  • payable tells us that this function can receive ether
Line 112 - require(block.timestamp > startSaleTimestamp, "Public sale hasn't started yet");

Line 113 - require(tubbiesToMint <= 5, "Only up to 5 tubbies can be minted at once");

LINES 112-113 EXPLAINED:

This part is pretty self-explanatory, right? Coding is basically English :P that’s what I think at least

  • Require keyword requires this specific code inside the brackets to return as a checkmark and if it doesn’t the transaction reverts with the reason “Public sale hasn’t started yet”
Line 114 - uint cost;

Line 115 - unchecked {

Line 116 -     cost = tubbiesToMint * 0.1 ether;

Line 117 - }

Line 118 - require(cost == msg.value, “wrong payment”);

LINES 114-118 EXPLAINED:

This is where *some* math is involved but it's super simple

  • uint cost, this is a variable for how much Ethereum should have been sent to the function to mint tubbiestToMint tubbies
  • Whenever you do arithmetic in solidity, there are checks behind the scenes to prevent overflows/underflow (math stuffs), wrapping arithmetic in unchecked means that the code inside won't go under these checks. This is used when you know there is no way that the calculation will overflow/underflow (Deor made this big brain)
  • Cost = tubbiesToMint * 0.1 ether, this calculates the cost of Tubbies (the number of tubbies the user wanted to mint that we got in line 111) times 0.1 Ether (mint price)
  • This last line is used to make sure that the amount sent to the contract, msg.value, is the same as the cost to mint that amount of Tubbies. If it is more or less than the amount, the transaction reverts with “wrong payment”

And the rest ~ Lines 119-121 - I will not cover since it’s basically an error checker in a way + am lazy

I wanna sleep too ;-;
I wanna sleep too ;-;

Congratulations~ You analyzed one function of a smart contract! It’s really not that difficult if you put in some time <3 You got this if you really want to learn programming or anything don’t give upp.

Note* I’m still “new” in Solidity, howeverrr, I’m experienced in other coding languages~

You can ignore this part, just saying my thoughts ahaha

This I’m not too sure about, however, by doing some checking on Opensea and Foundation which you’re allowed to mint your NFT and put it on for sale (Implemented on the site).

I think that Opensea’s standard NFT Smart Contract thingy is ERC-1155 compared to Foundations ERC-721. Like there isn’t really THAT much of a difference between 1155 vs 721, it's just that if the NFT has a supply of 1 why doesn’t Opensea make it ERC-721.

Not 100% sure but I think the reason Opensea is using ERC-1155 is that they have polygon integration which allows users to mint X amount of the specific NFT and maybe they didn’t want to switch to ERC-721 for ETH mints idk lol you can tell me why, I’m just curious :shrug:

Just want to say thank you for making it this far <3
Just want to say thank you for making it this far <3

Quick little Marketplaces tabs~

ETH (Remember to verify the website addresses!!, also not going to include all of themms)

  • Opensea
  • Looksrare
  • Foundation
  • Anifty

Solana

  • Magic Eden
  • Solanart
Let's go shopping!!!
Let's go shopping!!!

The Rugs D:

If you haven’t heard about what rugs are then you’re lucky and you didn’t read T ^ T  :claps:

Rugs, just think of these as a bad term. Rugs are basically people getting robbed of their money~ That’s the gist of it haha

Personally, I’ve been rugged a few times ahaha but you always have to learn from the past in order to improve and get better:D

So, I’ll give a few smol tips to recognize a Rug but most importantly you HAVE to do your own research okay? Do your research, please~.

Tips~

  • Research, research research! I can’t stress this enough
  • Look at the Roadmap
  • Ask questions to yourself
    • Is the hype artificial?
    • Or is the hype legit?
    • Do comparisons! Online users vs Offline (bots?)
    • Is the server botted?
    • How active is the discord?
    • Is the team doxxed? (This one is up to you)
    • Do you like what the project/team is doing? If so why?
    • Did anything sus happen?
    • Do you have a random gut feeling? Good feeling or bad? Trust your gut sometimes, it’s saved me several times
  • One thing to note, it’s possible that project’s that require level grinding are cash grabs
Worried for you okay? Please be careful Senpai~
Worried for you okay? Please be careful Senpai~

The last few things I would like to bring to your attention would be scam links and honeypots!

  • Scam links are super popular nowadays so please be wary and always double-check links!
  • Double-check, triple-check with admins, mods if you aren’t sure
  • And make sure the staff aren’t compromised either

Honeypots

  • Another form of scam link, HOWEVER, is more complicated as they disguise themselves as the legit mint link and could drain your wallet for all that in that specific wallet
Remember to take a break!
Remember to take a break!

Welp, I think that’s all? Thank you for reading! If you ever want to talk about anythingg I don’t mind ahaha my Dm’s are open~

I hope you guys enjoyed reading this and learned a thing or two, if not that’s fine :3

A special thanks to Cari, Deor, Ed, Splongk and Rain&Coffee for doing some proof reading and just overall helping <3

Thank you once again for reading this far, I appreciate you <3

Thank you <3
Thank you <3

References~

https://www.web3.university/article/comparing-erc-721-to-erc-1155

https://etherscan.io/address/0xca7ca7bcc765f77339be2d648ba53ce9c8a262bd#code

https://www.zdnet.com/article/hackers-hijack-smart-contracts-in-new-cryptocurrency-token-rug-pull-scams/

Deor

Subscribe to Voids
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.