Skip to content

Commit

Permalink
Handle newer solc-x versions
Browse files Browse the repository at this point in the history
  • Loading branch information
norhh committed Aug 24, 2024
1 parent 99bf452 commit 1febf66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mythril/ethereum/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,12 @@ def extract_version(file: typing.Optional[str]):
version_constraint = semver.SimpleSpec(version_spec)

for version in all_versions:
if version in version_constraint:
if "0.5.17" in str(version):
semver_version = semver.Version(str(version))
if semver_version in version_constraint:
if "0.5.17" in str(semver_version):
# Solidity 0.5.17 Does not compile in a lot of cases.
continue
return str(version)
return str(semver_version)


def extract_binary(file: str) -> Tuple[str, str]:
Expand Down

0 comments on commit 1febf66

Please sign in to comment.