saving 6 gas it iszero()

This commit is contained in:
dr. mia von steinkirch, phd 2023-01-24 16:29:54 -08:00 committed by GitHub
parent 148badd489
commit 916caaf47a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,13 @@
- avoid calls to other contracts.
- ++i uses 5 gas less than i++.
- if you dont need a variable anymore, you should delete it using the delete keyword provided by solidity or by setting it to its default value.
<br>
<img width="532" alt="Screen Shot 2023-01-24 at 4 28 45 PM" src="https://user-images.githubusercontent.com/1130416/214452718-b051caed-49e4-45fb-b955-976d20e97cbd.png">
<br>
#### pack variables