@@ -539,7 +539,7 @@ module.exports = {
539
539
outLength : new BN ( 0 )
540
540
}
541
541
542
- // Deduct gas costs for hashingq
542
+ // Deduct gas costs for hashing
543
543
subGas ( runState , new BN ( runState . _common . param ( 'gasPrices' , 'sha3Word' ) ) . imul ( length . divCeil ( new BN ( 32 ) ) ) )
544
544
checkCallMemCost ( runState , options , localOpts )
545
545
checkOutOfGas ( runState , options )
@@ -1011,7 +1011,7 @@ function makeCall (runState, callOptions, localOpts, cb) {
1011
1011
if ( results . vm . return && ( ! results . vm . exceptionError || results . vm . exceptionError . error === ERROR . REVERT ) ) {
1012
1012
memStore ( runState , localOpts . outOffset , results . vm . return , new BN ( 0 ) , localOpts . outLength , false )
1013
1013
1014
- if ( results . vm . exceptionError && results . vm . exceptionError . error === ERROR . REVERT && runState . opName === 'CREATE' ) {
1014
+ if ( results . vm . exceptionError && results . vm . exceptionError . error === ERROR . REVERT && isCreateOpCode ( runState . opName ) ) {
1015
1015
runState . lastReturned = results . vm . return
1016
1016
}
1017
1017
@@ -1049,6 +1049,10 @@ function makeCall (runState, callOptions, localOpts, cb) {
1049
1049
}
1050
1050
}
1051
1051
1052
+ function isCreateOpCode ( opName ) {
1053
+ return opName === 'CREATE' || opName === 'CREATE2'
1054
+ }
1055
+
1052
1056
function getContractStorage ( runState , address , key , cb ) {
1053
1057
if ( runState . _common . gteHardfork ( 'constantinople' ) ) {
1054
1058
async . parallel ( {
0 commit comments