class EVM {

  @VisibleForTesting
  Operation operationAtOffset(final Code code, final int contractAccountVersion, final int offset) {
    final Bytes bytecode = code.getBytes();
    // If the length of the program code is shorter than the required offset, halt execution.
    if (offset >= bytecode.size()) {
      return endOfScriptStop;
    }

    final byte opcode = bytecode.get(offset);
    final Operation operation = operations.get(opcode, contractAccountVersion);
    if (operation == null) {
      return new InvalidOperation(opcode, null);
    } else {
      return operation;
    }
  }

  public  EVM(final OperationRegistry operations, final GasCalculator gasCalculator);

}