# Intro to NFTs? **Published by:** [Voids](https://paragraph.com/@voidsowo/) **Published on:** 2022-02-28 **URL:** https://paragraph.com/@voidsowo/intro-to-nfts ## Content Non-Fungible Tokens (NFT) OwO?Nyaa\~ Lets goo hehHello 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 notsWelcome\~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 ArtERC-1155 - NFT which isn’t uniqueERC-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)Complicated code which isn’t that complicated but complicated yup sameI’m also lazy so I’ll leave a link here which should give you a better explanationBut long story short it's just code that allows you to mint an NFThttps://docs.soliditylang.org/en/latest/introduction-to-smart-contracts.htmlRugsBasically 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 altcoinsHoneypotsA 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 EtherScam~Opensea/LooksRare/FoundationNFT MarketplaceKnowledge Is Vast\~Smart ContractsIf 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\~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 FunctionThis 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 mintFromSaleThe brackets “(uint tubbiesToMint)” is the user’s inputted desired amount of Tubbies they want to mintPublic tells us that the function is public for internal/external usepayable tells us that this function can receive etherLine 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 leastRequire 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 simpleuint cost, this is a variable for how much Ethereum should have been sent to the function to mint tubbiestToMint tubbiesWhenever 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 lazyI 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 <3Quick little Marketplaces tabs~ETH (Remember to verify the website addresses!!, also not going to include all of themms)OpenseaLooksrareFoundationAniftySolanaMagic EdenSolanartLet'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 enoughLook at the RoadmapAsk questions to yourselfIs 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 timesOne thing to note, it’s possible that project’s that require level grinding are cash grabsWorried 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 LinksScam 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 sureAnd make sure the staff aren’t compromised eitherHoneypotsAnother 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 walletRemember 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 <3Thank you <3References~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 ## Publication Information - [Voids](https://paragraph.com/@voidsowo/): Publication homepage - [All Posts](https://paragraph.com/@voidsowo/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@voidsowo): Subscribe to updates