@staticmethod
def _analyze_state(state: GlobalState) -> list:
    '\n\n        :param state:\n        :return:\n        '
    issues = []
    if is_prehook():
        opcode = state.get_current_instruction()['opcode']
        if (opcode in final_ops):
            for annotation in state.annotations:
                if isinstance(annotation, PredictablePathAnnotation):
                    if annotation.add_constraints:
                        constraints = (state.world_state.constraints + annotation.add_constraints)
                    else:
                        constraints = copy(state.world_state.constraints)
                    try:
                        transaction_sequence = solver.get_transaction_sequence(state, constraints)
                    except UnsatError:
                        continue
                    description = (('The ' + annotation.operation) + ' is used in to determine a control flow decision. ')
                    description += "Note that the values of variables like coinbase, gaslimit, block number and timestamp are predictable and can be manipulated by a malicious miner. Also keep in mind that attackers know hashes of earlier blocks. Don't use any of those environment variables for random number generation or to make critical control flow decisions."
                    '\n                        Usually report low severity except in cases where the hash of a previous block is used to\n                        determine control flow. \n                        '
                    severity = ('Medium' if ('hash' in annotation.operation) else 'Low')
                    '\n                        Note: We report the location of the JUMPI that lead to this path. Usually this maps to an if or\n                        require statement.\n                        '
                    swc_id = (TIMESTAMP_DEPENDENCE if ('timestamp' in annotation.operation) else WEAK_RANDOMNESS)
                    issue = Issue(contract=state.environment.active_account.contract_name, function_name=state.environment.active_function_name, address=annotation.location, swc_id=swc_id, bytecode=state.environment.code.bytecode, title='Dependence on predictable environment variable', severity=severity, description_head='A control flow decision is made based on a predictable variable.', description_tail=description, gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used), transaction_sequence=transaction_sequence)
                    issues.append(issue)
        elif (opcode == 'JUMPI'):
            for annotation in state.mstate.stack[(- 2)].annotations:
                if isinstance(annotation, PredictableValueAnnotation):
                    state.annotate(PredictablePathAnnotation(annotation.operation, state.get_current_instruction()['address'], add_constraints=annotation.add_constraints))
                    break
        elif (opcode == 'BLOCKHASH'):
            param = state.mstate.stack[(- 1)]
            try:
                constraint = [ULT(param, state.environment.block_number), ULT(state.environment.block_number, symbol_factory.BitVecVal((2 ** 255), 256))]
                solver.get_model((state.world_state.constraints + constraint))
                state.annotate(OldBlockNumberUsedAnnotation(constraint))
            except UnsatError:
                pass
    else:
        opcode = state.environment.code.instruction_list[(state.mstate.pc - 1)]['opcode']
        if (opcode == 'BLOCKHASH'):
            annotations = cast(List[OldBlockNumberUsedAnnotation], list(state.get_annotations(OldBlockNumberUsedAnnotation)))
            if len(annotations):
                state.mstate.stack[(- 1)].annotate(PredictableValueAnnotation('block hash of a previous block', add_constraints=annotations[0].block_constraints))
        else:
            state.mstate.stack[(- 1)].annotate(PredictableValueAnnotation('block.{} environment variable'.format(opcode.lower())))
    return issues
:param state:
:return:
@staticmethod
def _analyze_state(state: GlobalState) -> list:
    '\n\n        :param state:\n        :return:\n        '
    issues = []
    if is_prehook():
        opcode = state.get_current_instruction()['opcode']
        if (opcode in final_ops):
            for annotation in state.annotations:
                if isinstance(annotation, PredictablePathAnnotation):
                    if annotation.add_constraints:
                        constraints = (state.world_state.constraints + annotation.add_constraints)
                    else:
                        constraints = copy(state.world_state.constraints)
                    try:
                        transaction_sequence = solver.get_transaction_sequence(state, constraints)
                    except UnsatError:
                        continue
                    description = (('The ' + annotation.operation) + ' is used in to determine a control flow decision. ')
                    description += "Note that the values of variables like coinbase, gaslimit, block number and timestamp are predictable and can be manipulated by a malicious miner. Also keep in mind that attackers know hashes of earlier blocks. Don't use any of those environment variables for random number generation or to make critical control flow decisions."
                    '\n                        Usually report low severity except in cases where the hash of a previous block is used to\n                        determine control flow. \n                        '
                    severity = ('Medium' if ('hash' in annotation.operation) else 'Low')
                    '\n                        Note: We report the location of the JUMPI that lead to this path. Usually this maps to an if or\n                        require statement.\n                        '
                    swc_id = (TIMESTAMP_DEPENDENCE if ('timestamp' in annotation.operation) else WEAK_RANDOMNESS)
                    issue = Issue(contract=state.environment.active_account.contract_name, function_name=state.environment.active_function_name, address=annotation.location, swc_id=swc_id, bytecode=state.environment.code.bytecode, title='Dependence on predictable environment variable', severity=severity, description_head='A control flow decision is made based on a predictable variable.', description_tail=description, gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used), transaction_sequence=transaction_sequence)
                    issues.append(issue)
        elif (opcode == 'JUMPI'):
            for annotation in state.mstate.stack[(- 2)].annotations:
                if isinstance(annotation, PredictableValueAnnotation):
                    state.annotate(PredictablePathAnnotation(annotation.operation, state.get_current_instruction()['address'], add_constraints=annotation.add_constraints))
                    break
        elif (opcode == 'BLOCKHASH'):
            param = state.mstate.stack[(- 1)]
            try:
                constraint = [ULT(param, state.environment.block_number), ULT(state.environment.block_number, symbol_factory.BitVecVal((2 ** 255), 256))]
                solver.get_model((state.world_state.constraints + constraint))
                state.annotate(OldBlockNumberUsedAnnotation(constraint))
            except UnsatError:
                pass
    else:
        opcode = state.environment.code.instruction_list[(state.mstate.pc - 1)]['opcode']
        if (opcode == 'BLOCKHASH'):
            annotations = cast(List[OldBlockNumberUsedAnnotation], list(state.get_annotations(OldBlockNumberUsedAnnotation)))
            if len(annotations):
                state.mstate.stack[(- 1)].annotate(PredictableValueAnnotation('block hash of a previous block', add_constraints=annotations[0].block_constraints))
        else:
            state.mstate.stack[(- 1)].annotate(PredictableValueAnnotation('block.{} environment variable'.format(opcode.lower())))
    return issues