@@ -53,7 +53,7 @@ export interface RunTxOpts {
5353
5454 /**
5555 * If true, skips the validation of the tx's gas limit
56- * agains the block's gas limit.
56+ * against the block's gas limit.
5757 */
5858 skipBlockGasLimitValidation ?: boolean
5959
@@ -395,22 +395,19 @@ async function _runTx(this: VM, opts: RunTxOpts): Promise<RunTxResult> {
395395 `Running tx=0x${
396396 tx . isSigned ( ) ? tx . hash ( ) . toString ( 'hex' ) : 'unsigned'
397397 } with caller=${ caller } gasLimit=${ gasLimit } to=${
398- to ? to . toString ( ) : ' '
398+ to ? .toString ( ) ?? 'none '
399399 } value=${ value } data=0x${ short ( data ) } `
400400 )
401401 }
402402
403403 const results = ( await evm . executeMessage ( message ) ) as RunTxResult
404404 if ( this . DEBUG ) {
405+ const { gasUsed, exceptionError, returnValue, gasRefund } = results . execResult
405406 debug ( '-' . repeat ( 100 ) )
406407 debug (
407- `Received tx results gasUsed=${ results . gasUsed } execResult: [ gasUsed=${
408- results . gasUsed
409- } exceptionError=${
410- results . execResult . exceptionError ? results . execResult . exceptionError . error : ''
411- } returnValue=${ short ( results . execResult . returnValue ) } gasRefund=${
412- results . execResult . gasRefund
413- } ]`
408+ `Received tx execResult: [ gasUsed=${ gasUsed } exceptionError=${
409+ exceptionError ? `'${ exceptionError . error } '` : 'none'
410+ } returnValue=0x${ short ( returnValue ) } gasRefund=${ gasRefund ?? 0 } ]`
414411 )
415412 }
416413
@@ -423,7 +420,7 @@ async function _runTx(this: VM, opts: RunTxOpts): Promise<RunTxResult> {
423420 debug ( `Generated tx bloom with logs=${ results . execResult . logs ?. length } ` )
424421 }
425422
426- // Caculate the total gas used
423+ // Calculate the total gas used
427424 results . gasUsed . iadd ( txBaseFee )
428425 if ( this . DEBUG ) {
429426 debugGas ( `tx add baseFee ${ txBaseFee } to gasUsed (-> ${ results . gasUsed } )` )
@@ -461,7 +458,7 @@ async function _runTx(this: VM, opts: RunTxOpts): Promise<RunTxResult> {
461458 // Update miner's balance
462459 let miner
463460 if ( this . _common . consensusType ( ) === ConsensusType . ProofOfAuthority ) {
464- // Backwards-compatibilty check
461+ // Backwards-compatibility check
465462 // TODO: can be removed along VM v6 release
466463 if ( 'cliqueSigner' in block . header ) {
467464 miner = block . header . cliqueSigner ( )
0 commit comments