Several people asked me yesterday how to read the code for NFT smart contracts, so here's a brief thread on how I do it.
1/ First go to @opensea and find an NFT you want to review and click into its details section. In there you'll find a link to the contract on Etherscan.
2/ Click that link and you'll land on the Contract Overview page. Find the tab that says "Contract", and if it's got a green check mark you can get excited because it means the developers uploaded code for you to read.
3/ If there's no green check, you have the option of decompiling the byte code, but that output isn't pretty and it's no fun to read. You're better off just bugging the developers to verify their contract on Etherscan.
4/ Once you get to the Contract tab, check the Contract Source Code format. If it says "Solidity" that means the developer uploaded one big file, and you'll have to search that massive text box to find the good stuff.
5/ Scroll all the way to the bottom, and then start scrolling up until you find the contract definition. This is usually the only interesting contract, and the rest are open source includes.
6/ If the Contract Source Code format says "Standard Json-Input" then you're in luck, the developer uploaded multiple smaller files and you're going to have a fun time reading through them.
7/ To any developers looking for a simple way to verify their contract, I ended up using the github.com/rkalis/truffle… plugin, since I'm using Truffle. I'm sure there are even simpler ways to do it in Hardhat though!
8/ Hope this helps those of you looking to start exploring contract land. Let me know if you have any questions or find anything interesting!
9/ And finally, make sure to give my NFT project a follow: @mystoners We’re dropping in 5 days on International Rock Day!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with sarasioux.eth

sarasioux.eth Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @altcryp

7 Jul
I've been reviewing some of the recent NFT smart contracts as I work on my own, and it's awesome to see the evolution from one version to the next and the little innovations each team puts in. Here's a thread of my favorite contract tricks.
1/ First, I reviewed the following NFT projects, listed in order of their contract launch:

- BAYC
- The Alien Boy
- Wicked Craniums
- My Fucking Pickles
- Cool Cats
- Bulls on the Block
- Forgotten Runes Wizard Cult
- Sewer Rat Social Club
- Lucky Manki
- Degenz
2/ I also wanted to review @MadCatMilitia and @DeadHeadsNFT, but they did not upload their source code to Etherscan and unfortunately I don't like to read decompiled byte code. Will revisit them if they update!

So, starting with BAYC, which is my "genesis" contract.
Read 20 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(