def _analyze_state(self, state):
        """

        :param state:
        :return:
        """
        instruction = state.get_current_instruction()

        if instruction["opcode"] != "CALL":
            return []

        address = instruction["address"]
        if self._cache_addresses.get(address, False):
            return []
        call_value = state.mstate.stack[-3]
        target = state.mstate.stack[-2]

        eth_sent_total = symbol_factory.BitVecVal(0, 256)

        constraints = copy(state.mstate.constraints)

        for tx in state.world_state.transaction_sequence:
            if tx.caller == 0xDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF:
                # There's sometimes no overflow check on balances added.
                # But we don't care about attacks that require more 2^^256 ETH to be sent.

                constraints += [BVAddNoOverflow(eth_sent_total, tx.call_value, False)]
                eth_sent_total = Sum(eth_sent_total, tx.call_value)
        constraints += [
            UGT(call_value, eth_sent_total),
            target == state.environment.sender,
        ]

        try:

            transaction_sequence = solver.get_transaction_sequence(state, constraints)

            debug = json.dumps(transaction_sequence, indent=4)

            issue = Issue(
                contract=state.environment.active_account.contract_name,
                function_name=state.environment.active_function_name,
                address=instruction["address"],
                swc_id=UNPROTECTED_ETHER_WITHDRAWAL,
                title="Unprotected Ether Withdrawal",
                severity="High",
                bytecode=state.environment.code.bytecode,
                description_head="Anyone can withdraw ETH from the contract account.",
                description_tail="Arbitrary senders other than the contract creator can withdraw ETH from the contract"
                + " account without previously having sent an equivalent amount of ETH to it. This is likely to be"
                + " a vulnerability.",
                debug=debug,
                gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used),
            )
        except UnsatError:
            log.debug("[ETHER_THIEF] no model found")
            return []

        self._cache_addresses[address] = True

        return [issue]
def _analyze_state ( self , state ) : instruction = state . get_current_instruction ( ) if instruction [ "opcode" ] != "CALL" : return [ ] address = instruction [ "address" ] if self . _cache_addresses . get ( address , False ) : return [ ] call_value = state . mstate . stack [ - 3 ] target = state . mstate . stack [ - 2 ] eth_sent_total = symbol_factory . BitVecVal ( 0 , 256 ) constraints = copy ( state . mstate . constraints ) for tx in state . world_state . transaction_sequence : if tx . caller == 0xDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF : constraints += [ BVAddNoOverflow ( eth_sent_total , tx . call_value , False ) ] eth_sent_total = Sum ( eth_sent_total , tx . call_value ) constraints += [ UGT ( call_value , eth_sent_total ) , target == state . environment . sender , ] try : transaction_sequence = solver . get_transaction_sequence ( state , constraints ) debug = json . dumps ( transaction_sequence , indent = 4 ) issue = Issue ( contract = state . environment . active_account . contract_name , function_name = state . environment . active_function_name , address = instruction [ "address" ] , swc_id = UNPROTECTED_ETHER_WITHDRAWAL , title = "Unprotected Ether Withdrawal" , severity = "High" , bytecode = state . environment . code . bytecode , description_head = "Anyone can withdraw ETH from the contract account." , description_tail = "Arbitrary senders other than the contract creator can withdraw ETH from the contract" + " account without previously having sent an equivalent amount of ETH to it. This is likely to be" + " a vulnerability." , debug = debug , gas_used = ( state . mstate . min_gas_used , state . mstate . max_gas_used ) , ) except UnsatError : log . debug ( "[ETHER_THIEF] no model found" ) return [ ] self . _cache_addresses [ address ] = True return [ issue ]
:param state:
        :return: