💻 How I made a $20 mint contract for Croodles

If you bought a Croodle (they're now sold out ), you may have seen that the transaction cost was low as $20 when gas prices were around 80-70 gwei, which is the most common range.

That's my Croodle!
That's my Croodle!

So how does it works? I've used a custom ERC721 contract that uses a super efficient minting mechanism created by @squeebo_nft as well as a lot of modified variables and functions, maintaining all the original features.

Instead of storing a lot of stuff, it just pushes the new owner to the array
Instead of storing a lot of stuff, it just pushes the new owner to the array

And how about the Enumerable set of functions? The @OpenZeppelin implementation has a lot of unnecessary variable assignments, so I cut all of that and created "free" functions that does not require storing data simply by reading dynamic data from the contract. Inspired by @0xInuarashi.

There are no variables in this contract
There are no variables in this contract

If you are interested in digging deeper into these contracts and all the source files, you can checkout the Croodles official code and the Sol-Temple repo, where I store all my contracts.

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