mirror of
https://github.com/autistic-symposium/web3-starter-sol.git
synced 2025-04-22 16:59:08 -04:00
saving 6 gas it iszero()
This commit is contained in:
parent
148badd489
commit
916caaf47a
@ -9,6 +9,13 @@
|
||||
- avoid calls to other contracts.
|
||||
- ++i uses 5 gas less than i++.
|
||||
- if you don’t 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user