@Override
  public long calculateGasRefund(
      final Transaction transaction,
      final MessageFrame initialFrame,
      final long ignoredCodeDelegationRefund) {

    final long refundAllowance = calculateRefundAllowance(transaction, initialFrame);

    return initialFrame.getRemainingGas() + refundAllowance;
  }
Memory cost.

@param length the length
@return the cost
evm/src/main/java/org/hyperledger/besu/evm/gascalculator/FrontierGasCalculator.java