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
//1. If current value equals new value (this is a no-op), 200 gas is deducted.
148
+
//2. If current value does not equal new value
149
+
// 2.1 If original value equals current value (this storage slot has not been changed by the current execution context)
150
+
// 2.1.1 If original value is 0, 20000 gas is deducted.
151
+
// 2.1.2 Otherwise, 5000 gas is deducted. If new value is 0, add 15000 gas to refund counter.
152
+
// 2.2 If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses.
153
+
// 2.2.1 If original value is not 0
154
+
// 2.2.1.1 If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0.
155
+
// 2.2.1.2 If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter.
156
+
// 2.2.2 If original value equals new value (this storage slot is reset)
157
+
// 2.2.2.1 If original value is 0, add 19800 gas to refund counter.
158
+
// 2.2.2.2 Otherwise, add 4800 gas to refund counter.
0 commit comments