"@yugalabs wrote a terrible smart contract"

This is the popular opinion tonight.

Here are 5 facts no one is talking about ๐Ÿงต ๐Ÿ‘‡
1) OtherDeeds was a Non-Sequential mint

Apes & Mutants receive Land token ids 15k -> 45k as a free claim over next 21 days.

The public minted token ids 45k -> 100k.

Giving Apes & Mutants the lower token ids would be impossible using ERC721A.
2) 200K supply of NFTs

Do you need to know who owns what token ids on chain?

If Yes, ERC721Enumerable is the only solution for a collection of this size.

Which sucks because it uses a lot of gas.
3) Selling NFTs in @ApeCoin

This requires more gas than selling in ETH.

1. User must pay to approve spending $APE
2. Spending the $APE is an extra 20k units of gas
4) Extra Gas for # of Mints Tracking

ERC721A showed us that tracking the number of mints can be packed into the user's balance data.

No extra gas needed.

Instead, @yugalabs opted for users to pay another 20K units of gas. Why not right?
5) No Batch Minting

Calling _safeMint over and over to batch mint is inefficient.

This updates the user's balance once per NFT minted (20k gas cost). [left image]

Instead, update the user's balance once for the entire batch. [right image]
I hope you learnt something new!

If you liked this, Iโ€™d appreciate if you share it with someone ๐Ÿ˜ƒ

โ€ข โ€ข โ€ข

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

Keep Current with jessefriedland.eth ๐Ÿ‘บ

jessefriedland.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!

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

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(