mirror of
https://github.com/autistic-symposium/web3-starter-sol.git
synced 2025-11-25 17:06:17 -05:00
saving 6 gas it iszero()
This commit is contained in:
parent
148badd489
commit
916caaf47a
1 changed files with 7 additions and 0 deletions
|
|
@ -9,6 +9,13 @@
|
||||||
- avoid calls to other contracts.
|
- avoid calls to other contracts.
|
||||||
- ++i uses 5 gas less than i++.
|
- ++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.
|
- 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>
|
<br>
|
||||||
|
|
||||||
#### pack variables
|
#### pack variables
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue