@Override
  public OperationResult execute(final MessageFrame frame, final EVM evm) {
    Code code = frame.getCode();
    if (code.getEofVersion() == 0) {
      return InvalidOperation.INVALID_RESULT;
    }
    final int memOffset = clampedToInt(frame.popStackItem());
    final int sourceOffset = clampedToInt(frame.popStackItem());
    final int length = clampedToInt(frame.popStackItem());
    final long cost = cost(frame, memOffset, length);
    if (cost > frame.getRemainingGas()) {
      return new OperationResult(cost, ExceptionalHaltReason.INSUFFICIENT_GAS);
    }

    final Bytes data = code.getData(sourceOffset, length);
    frame.writeMemory(memOffset, length, data);

    return new OperationResult(cost, null);
  }
Cost of data Copy operation.

@param frame the frame
@param memOffset the mem offset
@param length the length
@return the long
evm/src/main/java/org/hyperledger/besu/evm/operation/DataCopyOperation.java