diff --git a/mythril/ethereum/util.py b/mythril/ethereum/util.py index 3c613c16..3a734634 100644 --- a/mythril/ethereum/util.py +++ b/mythril/ethereum/util.py @@ -125,25 +125,14 @@ def solc_exists(version): :return: """ - solc_binaries = [] default_binary = "/usr/bin/solc" if sys.version_info[1] >= 6: if platform.system() == "Darwin": solcx.import_installed_solc() - installed = solcx.get_installed_solc_versions() - if "v" + version in installed: - solcx.set_solc_version("v" + version) - solc_binary = solcx.install.get_executable() - return solc_binary - else: - available = solcx.get_available_solc_versions() - if "v" + version in available: - solcx.install_solc("v" + version) - solcx.set_solc_version("v" + version) - solc_binary = solcx.install.get_executable() - return solc_binary - elif Version("0.4.2") <= Version(version) <= Version("0.4.9"): - return None + solcx.install_solc("v" + version) + solcx.set_solc_version("v" + version) + solc_binary = solcx.install.get_executable() + return solc_binary elif Version("0.4.2") <= Version(version) <= Version("0.4.25"): if not solc.main.is_solc_available(): solc.install_solc("v" + version) diff --git a/requirements.txt b/requirements.txt index 789cd80d..23c1d091 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ persistent>=4.2.0 plyvel py-flags py-evm==0.3.0a13 -py-solc-x==0.10.1 +py-solc-x==1.0.0 py-solc pytest>=3.6.0 pytest-cov diff --git a/setup.py b/setup.py index 740d5a26..45a9c304 100755 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ REQUIRED = [ "z3-solver>=4.8.5.0", "requests>=2.22.0", "py-solc", - "py-solc-x==0.10.1", + "py-solc-x==1.0.0", "semantic_version==2.8.5", "plyvel", "eth_abi==1.3.0",