@Override
  public OperationResult execute(final MessageFrame frame, final EVM evm) {
    if (frame.getCode().getEofVersion() != eofVersion) {
      return INVALID_OPERATION;
    }

    // manual check because some reads won't come until the "complete" step.
    if (frame.stackSize() < getStackItemsConsumed()) {
      return UNDERFLOW_RESPONSE;
    }

    Supplier<Code> codeSupplier = Suppliers.memoize(() -> getInitCode(frame, evm));

    if (frame.isStatic()) {
      return new OperationResult(0, ExceptionalHaltReason.ILLEGAL_STATE_CHANGE);
    }

    final long cost = cost(frame, codeSupplier);
    if (frame.getRemainingGas() < cost) {
      return new OperationResult(cost, ExceptionalHaltReason.INSUFFICIENT_GAS);
    }
    final Wei value = Wei.wrap(frame.getStackItem(0));

    final Address address = frame.getRecipientAddress();
    final MutableAccount account = frame.getWorldUpdater().getAccount(address);

    frame.clearReturnData();

    Code code = codeSupplier.get();

    if (code != null && code.getSize() > evm.getMaxInitcodeSize()) {
      frame.popStackItems(getStackItemsConsumed());
      return new OperationResult(cost, ExceptionalHaltReason.CODE_TOO_LARGE);
    }

    if (value.compareTo(account.getBalance()) > 0
        || frame.getDepth() >= 1024
        || account.getNonce() == -1
        || code == null
        || code.getEofVersion() != frame.getCode().getEofVersion()) {
      fail(frame);
    } else {
      account.incrementNonce();

      if (!code.isValid()) {
        fail(frame);
      } else {
        frame.decrementRemainingGas(cost);
        spawnChildMessage(frame, code, evm);
        frame.incrementRemainingGas(cost);
      }
    }
    return new OperationResult(cost, null, getPcIncrement());
  }
Instantiates a new Abstract create operation.

@param opcode the opcode
@param name the name
@param stackItemsConsumed the stack items consumed
@param stackItemsProduced the stack items produced
@param gasCalculator the gas calculator
@param eofVersion the EOF version this create operation is valid in
evm/src/main/java/org/hyperledger/besu/evm/operation/AbstractCreateOperation.java