@NotNull
  Code createCode(final EOFLayout layout) {
    if (!layout.isValid()) {
      return new CodeInvalid(layout.container(), "Invalid EOF Layout: " + layout.invalidReason());
    }

    final String validationError = eofValidator.validate(layout);
    if (validationError != null) {
      return new CodeInvalid(layout.container(), "EOF Code Invalid : " + validationError);
    }

    return new CodeV1(layout);
  }
Create Code.

@param bytes the bytes
@param createTransaction This is in a create transaction, allow dangling data
@return the code
evm/src/main/java/org/hyperledger/besu/evm/code/CodeFactory.java