Update solc-x (#1430)

* Update solc-x and change some functions

* make some changes

* update requirements
pull/1436/head
Nikhil Parasaram 4 years ago committed by GitHub
parent 79dfe70747
commit a257df3074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      mythril/ethereum/util.py
  2. 2
      requirements.txt
  3. 2
      setup.py

@ -125,25 +125,14 @@ def solc_exists(version):
:return: :return:
""" """
solc_binaries = []
default_binary = "/usr/bin/solc" default_binary = "/usr/bin/solc"
if sys.version_info[1] >= 6: if sys.version_info[1] >= 6:
if platform.system() == "Darwin": if platform.system() == "Darwin":
solcx.import_installed_solc() 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.install_solc("v" + version)
solcx.set_solc_version("v" + version) solcx.set_solc_version("v" + version)
solc_binary = solcx.install.get_executable() solc_binary = solcx.install.get_executable()
return solc_binary return solc_binary
elif Version("0.4.2") <= Version(version) <= Version("0.4.9"):
return None
elif Version("0.4.2") <= Version(version) <= Version("0.4.25"): elif Version("0.4.2") <= Version(version) <= Version("0.4.25"):
if not solc.main.is_solc_available(): if not solc.main.is_solc_available():
solc.install_solc("v" + version) solc.install_solc("v" + version)

@ -18,7 +18,7 @@ persistent>=4.2.0
plyvel plyvel
py-flags py-flags
py-evm==0.3.0a13 py-evm==0.3.0a13
py-solc-x==0.10.1 py-solc-x==1.0.0
py-solc py-solc
pytest>=3.6.0 pytest>=3.6.0
pytest-cov pytest-cov

@ -30,7 +30,7 @@ REQUIRED = [
"z3-solver>=4.8.5.0", "z3-solver>=4.8.5.0",
"requests>=2.22.0", "requests>=2.22.0",
"py-solc", "py-solc",
"py-solc-x==0.10.1", "py-solc-x==1.0.0",
"semantic_version==2.8.5", "semantic_version==2.8.5",
"plyvel", "plyvel",
"eth_abi==1.3.0", "eth_abi==1.3.0",

Loading…
Cancel
Save