lib/evm/opFns.js
function checkCallMemCost (runState, callOptions, localOpts) {
  // calculates the gas need for saving the output in memory
  subMemUsage(runState, localOpts.outOffset, localOpts.outLength)

  if (!callOptions.gasLimit) {
    callOptions.gasLimit = new BN(runState.gasLeft)
  }
}
function checkCallMemCost (runState, callOptions, localOpts) {
  // calculates the gas need for saving the output in memory
  subMemUsage(runState, localOpts.outOffset, localOpts.outLength)

  if (!callOptions.gasLimit) {
    callOptions.gasLimit = new BN(runState.gasLeft)
  }
}
function checkCallMemCost ( runState , callOptions , localOpts ) { // calculates the gas need for saving the output in memory subMemUsage ( runState , localOpts . outOffset , localOpts . outLength ) if ( ! callOptions . gasLimit ) { callOptions . gasLimit = new BN ( runState . gasLeft ) } }
checks to see if we have enough gas left for the memory reads and writes required by the CALLs
checks to see if we have enough gas left for the memory reads and writes required by the CALLs