@@ -26,37 +26,37 @@ export function updateSstoreGasEIP2200(runState: RunState, found: any, value: Bu
26
26
if ( current . equals ( value ) ) {
27
27
const sstoreNoopCost = runState . _common . param ( 'gasPrices' , 'sstoreNoopGasEIP2200' )
28
28
return runState . eei . useGas (
29
- new BN ( adjustSstoreGasEIP2929 ( runState , key , sstoreNoopCost , 'noop' ) ) ,
29
+ new BN ( adjustSstoreGasEIP2929 ( runState , key , sstoreNoopCost , 'noop' ) )
30
30
)
31
31
}
32
32
if ( original . equals ( current ) ) {
33
33
// Create slot
34
34
if ( original . length === 0 ) {
35
35
return runState . eei . useGas (
36
- new BN ( runState . _common . param ( 'gasPrices' , 'sstoreInitGasEIP2200' ) ) ,
36
+ new BN ( runState . _common . param ( 'gasPrices' , 'sstoreInitGasEIP2200' ) )
37
37
)
38
38
}
39
39
// Delete slot
40
40
if ( value . length === 0 ) {
41
41
runState . eei . refundGas (
42
- new BN ( runState . _common . param ( 'gasPrices' , 'sstoreClearRefundEIP2200' ) ) ,
42
+ new BN ( runState . _common . param ( 'gasPrices' , 'sstoreClearRefundEIP2200' ) )
43
43
)
44
44
}
45
45
// Write existing slot
46
46
return runState . eei . useGas (
47
- new BN ( runState . _common . param ( 'gasPrices' , 'sstoreCleanGasEIP2200' ) ) ,
47
+ new BN ( runState . _common . param ( 'gasPrices' , 'sstoreCleanGasEIP2200' ) )
48
48
)
49
49
}
50
50
if ( original . length > 0 ) {
51
51
if ( current . length === 0 ) {
52
52
// Recreate slot
53
53
runState . eei . subRefund (
54
- new BN ( runState . _common . param ( 'gasPrices' , 'sstoreClearRefundEIP2200' ) ) ,
54
+ new BN ( runState . _common . param ( 'gasPrices' , 'sstoreClearRefundEIP2200' ) )
55
55
)
56
56
} else if ( value . length === 0 ) {
57
57
// Delete slot
58
58
runState . eei . refundGas (
59
- new BN ( runState . _common . param ( 'gasPrices' , 'sstoreClearRefundEIP2200' ) ) ,
59
+ new BN ( runState . _common . param ( 'gasPrices' , 'sstoreClearRefundEIP2200' ) )
60
60
)
61
61
}
62
62
}
@@ -65,13 +65,13 @@ export function updateSstoreGasEIP2200(runState: RunState, found: any, value: Bu
65
65
// Reset to original non-existent slot
66
66
const sstoreInitRefund = runState . _common . param ( 'gasPrices' , 'sstoreInitRefundEIP2200' )
67
67
runState . eei . refundGas (
68
- new BN ( adjustSstoreGasEIP2929 ( runState , key , sstoreInitRefund , 'initRefund' ) ) ,
68
+ new BN ( adjustSstoreGasEIP2929 ( runState , key , sstoreInitRefund , 'initRefund' ) )
69
69
)
70
70
} else {
71
71
// Reset to original existing slot
72
72
const sstoreCleanRefund = runState . _common . param ( 'gasPrices' , 'sstoreCleanRefundEIP2200' )
73
73
runState . eei . refundGas (
74
- new BN ( adjustSstoreGasEIP2929 ( runState , key , sstoreCleanRefund , 'cleanRefund' ) ) ,
74
+ new BN ( adjustSstoreGasEIP2929 ( runState , key , sstoreCleanRefund , 'cleanRefund' ) )
75
75
)
76
76
}
77
77
}
0 commit comments