Update requirements.txt (#1807)

* Update requirements.txt

* use eth-abi

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update python

* Change ci image

* Change requirements

* Remove signature

* Use comma

* Handle pip

* Fix issues

* Reformat setup.py
pull/1812/head
Nikhil Parasaram 1 year ago committed by GitHub
parent a28d600ced
commit d167d20fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      .circleci/config.yml
  2. 9
      mythril/analysis/report.py
  3. 4
      mythril/config.ini
  4. 17
      requirements.txt
  5. 10
      setup.py
  6. 21
      tox.ini

@ -5,7 +5,7 @@ defaults:
# used for new integration testing, and it is build on top of the previous
# `mythril/dev_test_environment:0.0.43`, though a bit newer versions, thus
# there is a chance that it breaks some small things.
- image: mythril/mythril-ci
- image: norhh/mythril-ci
version: 2
jobs:
@ -37,17 +37,17 @@ jobs:
paths:
- .tox/py*
- /root/.cache/pip/wheels/
# TODO: Remove all --break-system-packages here in and mythril-ci image
- run:
name: Black style check
command: |
pip3 install --user black==22.3.0
pip3 install --user black==22.3.0 --break-system-packages
python3 -m black --check /home/mythril/
- run:
background: true
name: Launch of background geth instance
command: geth --syncmode full --http --http.api="db,eth,net,web3,personal" --shh
command: geth --syncmode full --http --http.api="db,eth,net,web3,personal"
- run:
name: Unit-testing
@ -69,7 +69,7 @@ jobs:
- run:
name: Ensuring that setup script is functional
command: python3 setup.py install
command: python3 -m build
working_directory: /home/mythril
- run:

@ -3,7 +3,12 @@ import logging
import re
import json
import operator
from eth_abi import decode_abi
try:
from eth_abi import decode
except ImportError:
from eth_abi import decode_abi as decode
from jinja2 import PackageLoader, Environment
from typing import Dict, List, Any, Optional
import hashlib
@ -230,7 +235,7 @@ class Issue:
if len(data) % 64 > 0:
data += "0" * (64 - len(data) % 64)
try:
decoded_output = decode_abi(type_info, bytes.fromhex(data))
decoded_output = decode(type_info, bytes.fromhex(data))
return decoded_output
except Exception as e:
return None

@ -0,0 +1,4 @@
[defaults]
dynamic_loading = infura
infura_id =

@ -6,15 +6,13 @@ asn1crypto>=0.22.0
configparser>=3.5.0
coverage<7.0,>6.0
py_ecc<5.0.0,>=1.4.7
eth_abi<3.0.0,>=2.0.0b4
eth-account<0.6.0,>=0.5.6
eth-abi>=4.0.0
eth-account>=0.8.0
ethereum-input-decoder>=0.2.2
eth-hash<0.4.0,>=0.3.1
eth-keyfile<0.6.0,>=0.5.1
eth-keys<0.4.0,>=0.2.1
eth-rlp<0.3.0,>=0.1.0
eth-typing<3.0.0,>=2.1.0
eth-utils<2
eth-keyfile>=0.6.0
eth-rlp>=0.3.0,<0.4.0
eth-utils>=2
hexbytes<0.3.0
jinja2>=2.9
MarkupSafe<2.1.0
@ -23,7 +21,7 @@ mypy-extensions<1.0.0
numpy
persistent>=4.2.0
py-flags
py-evm==0.5.0a1
py-evm==0.7.0a1
py-solc-x
py-solc
pytest>=3.6.0
@ -31,11 +29,10 @@ pyparsing<3,>=2.0.2
pytest-cov
pytest_mock
requests
rlp<3
rlp<4,>=3
semantic_version
scikit-learn
transaction>=2.2.1
typing-extensions<4,>=3.7.4
z3-solver<4.12.2.0,>=4.8.8.0
matplotlib
pre-commit<2.21.0

@ -16,19 +16,13 @@ import os
import io
class InstallCommand(_install):
def run(self):
check_call([sys.executable, "-m", "pip", "install", "cython"])
_install.run(self)
# Package meta-data.
NAME = "mythril"
DESCRIPTION = "Security analysis tool for Ethereum smart contracts"
URL = "https://github.com/ConsenSys/mythril"
AUTHOR = "ConsenSys Dilligence"
AUTHOR_MAIL = None
REQUIRES_PYTHON = ">=3.6.0"
REQUIRES_PYTHON = ">=3.7.0"
here = os.path.abspath(os.path.dirname(__file__))
# What packages are required for this module to be executed?
@ -135,5 +129,5 @@ setup(
package_data={"mythril.analysis.templates": ["*"], "mythril.support.assets": ["*"]},
include_package_data=True,
entry_points={"console_scripts": ["myth=mythril.interfaces.cli:main"]},
cmdclass={"install": InstallCommand, "verify": VerifyVersionCommand},
cmdclass={"verify": VerifyVersionCommand},
)

@ -1,12 +1,12 @@
[tox]
envlist = python3.6, python3.9, python3.10
envlist = python3.7, python3.9, python3.10
[testenv]
deps =
pytest
pytest-mock
passenv = MYTHRIL_DIR INFURA_ID
whitelist_externals = mkdir
passenv = MYTHRIL_DIR,INFURA_ID
allowlist_externals = mkdir
commands =
mkdir -p {toxinidir}/tests/testdata/outputs_current/
mkdir -p {toxinidir}/tests/testdata/outputs_current_laser_result/
@ -15,8 +15,8 @@ commands =
--disable-pytest-warnings \
{posargs}
[testenv:py36]
basepython = python3.6
[testenv:py37]
basepython = python3.7
setenv =
COVERAGE_FILE = .coverage.{envname}
deps =
@ -25,8 +25,7 @@ deps =
pytest-mock
pytest-cov
passenv = MYTHRIL_DIR INFURA_ID
whitelist_externals = mkdir
allowlist_externals = mkdir
commands =
mypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --no-strict-optional mythril
mkdir -p {toxinidir}/tests/testdata/outputs_current/
@ -50,8 +49,8 @@ deps =
pytest-mock
pytest-cov
passenv = MYTHRIL_DIR INFURA_ID
whitelist_externals = mkdir
passenv = MYTHRIL_DIR,INFURA_ID
allowlist_externals = mkdir
commands =
mypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --no-strict-optional mythril
mkdir -p {toxinidir}/tests/testdata/outputs_current/
@ -75,8 +74,8 @@ deps =
pytest-mock
pytest-cov
passenv = MYTHRIL_DIR INFURA_ID
whitelist_externals = mkdir
passenv = MYTHRIL_DIR,INFURA_ID
allowlist_externals = mkdir
commands =
mypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --no-strict-optional mythril
mkdir -p {toxinidir}/tests/testdata/outputs_current/

Loading…
Cancel
Save