# 💻 How I made a $20 mint contract for Croodles

By [naomsa](https://paragraph.com/@naomsa) · 2022-01-11

---

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!](https://storage.googleapis.com/papyrus_images/00dfb9e289d3a61511f9836520831c4ecd16effcf28ba0aabc585371e04d3057.png)

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](https://twitter.com/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](https://storage.googleapis.com/papyrus_images/8b79f2834dc92cfb5ad2bffd6c8a2b0dcaff9fc2fca9670cc927c7a1bc62a314.png)

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](https://twitter.com/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](https://twitter.com/0xInuarashi).

![There are no variables in this contract](https://storage.googleapis.com/papyrus_images/1cfa9dae2456a53f802442c81ec7afe8bd939e1216f2ebfbbd84e29b9eb4e434.png)

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](https://etherscan.io/address/0x51abcb8aeca60c69ca58e4bcfd6350ba7587ebfc#code) official code and the [Sol-Temple](https://github.com/naomsa/sol-temple) repo, where I store all my contracts.

---

*Originally published on [naomsa](https://paragraph.com/@naomsa/how-i-made-a-20-mint-contract-for-croodles)*
