When do we spend Gas ? #1251
-
I have some questions regarding how gas works. Q2-) Consider the following function. Do we lose any gas in changing 'a' value to 5 then again to 0 since require condition failed ? function() { |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@umershaikh123 You both questions answer is same, It will deduct the computation cost gas and return the remaining gas if fails. |
Beta Was this translation helpful? Give feedback.
-
Hey, I am assuming you are a curious one - you should look at my advice posted in here. It is a solid read for beginners, especially for your gas doubts. You will be able to answer your own questions after going through this, of course, if there are doubts I can explain. But try to answer yourself. Hope this helps! |
Beta Was this translation helpful? Give feedback.
@umershaikh123 You both questions answer is same, It will deduct the computation cost gas and return the remaining gas if fails.