gnosis/safe/safe_service.py
def check_proxy_code(self, address) -> bool:
        """
        Check if proxy is valid
        :param address: address of the proxy
        :return: True if proxy is valid, False otherwise
        """
        deployed_proxy_code = self.w3.eth.getCode(address)
        proxy_code_fns = (get_paying_proxy_deployed_bytecode,
                          get_proxy_factory_contract(self.w3,
                                                     self.proxy_factory_address).functions.proxyRuntimeCode().call)
        for proxy_code_fn in proxy_code_fns:
            if deployed_proxy_code == proxy_code_fn():
                return True
        return False
def check_proxy_code(self, address) -> bool:
        """
        Check if proxy is valid
        :param address: address of the proxy
        :return: True if proxy is valid, False otherwise
        """
        deployed_proxy_code = self.w3.eth.getCode(address)
        proxy_code_fns = (get_paying_proxy_deployed_bytecode,
                          get_proxy_factory_contract(self.w3,
                                                     self.proxy_factory_address).functions.proxyRuntimeCode().call)
        for proxy_code_fn in proxy_code_fns:
            if deployed_proxy_code == proxy_code_fn():
                return True
        return False
Check if proxy is valid
        :param address: address of the proxy
        :return: True if proxy is valid, False otherwise