Fixes for latest pythx version

analyze-with-mythx
Nathan 5 years ago
parent 29796dd8da
commit 9f04fa0c8a
  1. 4
      mythril/laser/ethereum/util.py
  2. 2
      mythril/mythx/__init__.py
  3. 2
      requirements.txt
  4. 2
      setup.py

@ -45,8 +45,8 @@ def get_instruction_index(
"""
index = 0
for instr in instruction_list:
if instr["address"] == address:
return index
if instr["address"] > address:
return index - 1
index += 1
return None

@ -75,7 +75,7 @@ def analyze(contracts: List[SolidityContract], analysis_mode: str = "quick") ->
issue = Issue(
contract=contract.name,
function_name=None,
address=int(issue.locations[0].source_map.split(":")[0]),
address=issue.locations[0].source_map.components[0].offset,
swc_id=issue.swc_id[4:], # remove 'SWC-' prefix
title=issue.swc_title,
bytecode=contract.creation_code,

@ -21,7 +21,7 @@ py-solc
pytest>=3.6.0
pytest-cov
pytest_mock
requests
requests>=2.22.0
rlp>=1.0.1
transaction>=2.2.1
z3-solver>=4.8.5.0

@ -28,7 +28,7 @@ REQUIRED = [
"py_ecc==1.4.2",
"ethereum>=2.3.2",
"z3-solver>=4.8.5.0",
"requests",
"requests>=2.22.0",
"py-solc",
"plyvel",
"eth_abi==1.3.0",

Loading…
Cancel
Save