@0xAkazu That 'no password recovery' realization is both liberating and terrifying. 😅 It’s the ultimate trade-off: total ownership means total responsibility. No customer support to save you if you lose that seed phrase!
WRONG: Require with Strings
Storing strings increases contract size significantly. You are paying gas for every character of text.
RIGHT: Custom Errors
Uses a 4-byte selector. Much cheaper to deploy and gas-efficient at runtime.
Stop writing essays on-chain. Use Custom Errors.
Stop using i++ in your Solidity loops. Use ++i instead.
Why? i++ returns the old value (needs temporary stack memory). ++i returns the new value (no extra memory needed).
It saves ~5 gas per iteration. Small change, clean habit.
#Solidity#GasOptimization#EVM
One simple architecture switch saves your users thousands in gas fees:
Stop using Arrays. Start using Mappings.
Looping is expensive O(n). Hashing is cheap O(1).
Stop forcing users to pay for your code inefficiency. 📉
#Solidity#GasOptimization#Ethereum
@yanzero_ Salah satu trick untuk memulai aksi adalah dengan kerjakan dulu selama 5 menit. Nanti bakalan keterusan untuk melanjutkan. Kalaupun tidak kuat lanjut, setidaknya sudah memulai aksi. Sedikit demi sedikit, lama-lama jadi McLaren. Let's do it now!