Squeebo
Jan 10, 2022

--

> Remember how we said writing from zero to non-zero costs 20,000 gas but 5,000 gas when the value is changed from non-zero to non-zero? That means if we start totalSupply at 1 instead of zero, we’ll easily save 15,000 gas.

You should double-check this; you shifted this charge into the contract deployment, and made the rest of your code more brittle.

--

--

Squeebo
Squeebo

Written by Squeebo

👨‍👧‍👦Father 👨‍💻Geek 💪USMC 🥃Scotchie 👨‍🔬Solidity mad scientist :: Discord: Squeebo#0001 :: https://t.co/ydqstnZb6O

Responses (1)