You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 0. If *gasleft* is less than or equal to 2300, fail the current call.
166
+
// 1. If current value equals new value (this is a no-op), SSTORE_NOOP_GAS gas is deducted.
167
+
// 2. If current value does not equal new value:
168
+
// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context):
169
+
// 2.1.1. If original value is 0, SSTORE_INIT_GAS gas is deducted.
170
+
// 2.1.2. Otherwise, SSTORE_CLEAN_GAS gas is deducted. If new value is 0, add SSTORE_CLEAR_REFUND to refund counter.
171
+
// 2.2. If original value does not equal current value (this storage slot is dirty), SSTORE_DIRTY_GAS gas is deducted. Apply both of the following clauses:
172
+
// 2.2.1. If original value is not 0:
173
+
// 2.2.1.1. If current value is 0 (also means that new value is not 0), subtract SSTORE_CLEAR_REFUND gas from refund counter. We can prove that refund counter will never go below 0.
174
+
// 2.2.1.2. If new value is 0 (also means that current value is not 0), add SSTORE_CLEAR_REFUND gas to refund counter.
175
+
// 2.2.2. If original value equals new value (this storage slot is reset):
176
+
// 2.2.2.1. If original value is 0, add SSTORE_INIT_REFUND to refund counter.
177
+
// 2.2.2.2. Otherwise, add SSTORE_CLEAN_REFUND gas to refund counter.
0 commit comments