Refactor package and class names

pull/730/head
Bernhard Mueller 6 years ago
parent db5a0f91d1
commit e04dd1cdda
  1. 3
      mythril/analysis/symbolic.py
  2. 2
      mythril/disassembler/disassembly.py
  3. 3
      mythril/ether/__init__.py
  4. 0
      mythril/ethereum/ethcontract.py
  5. 2
      mythril/ethereum/evm.py
  6. 4
      mythril/ethereum/interface/leveldb/accountindexing.py
  7. 2
      mythril/ethereum/interface/leveldb/client.py
  8. 0
      mythril/ethereum/util.py
  9. 6
      mythril/mythril.py
  10. 0
      mythril/solidity/__init__.py
  11. 4
      mythril/solidity/soliditycontract.py
  12. 7
      mythril/support/truffle.py
  13. 2
      tests/disassembler_test.py
  14. 2
      tests/ethcontract_test.py
  15. 4
      tests/graph_test.py
  16. 4
      tests/laser/transaction/create_transaction_test.py
  17. 2
      tests/native_test.py
  18. 5
      tests/report_test.py
  19. 2
      tests/solidity_contract_test.py
  20. 4
      tests/svm_test.py
  21. 2
      tests/testdata/compile.py

@ -1,9 +1,8 @@
from mythril.analysis.security import get_detection_module_hooks
from mythril.laser.ethereum import svm
from mythril.laser.ethereum.state.account import Account
from mythril.ether.soliditycontract import SolidityContract, ETHContract
from mythril.solidity.soliditycontract import SolidityContract, ETHContract
import copy
import logging
from .ops import get_variable, SStore, Call, VarType
from mythril.laser.ethereum.strategy.basic import (
DepthFirstSearchStrategy,

@ -1,4 +1,4 @@
from mythril.ether import util
from mythril.ethereum import util
from mythril.disassembler import asm
from mythril.support.signatures import SignatureDb
import logging

@ -1,3 +0,0 @@
import time
start_time = time.time()

@ -1,7 +1,7 @@
from ethereum import vm, messages, transactions
from ethereum.state import State
from ethereum.slogging import get_logger
from mythril.ether import util
from mythril.ethereum import util
from logging import StreamHandler
from io import StringIO
import re

@ -1,5 +1,5 @@
import logging
from mythril import ether
from mythril import ethereum
import time
from ethereum.messages import Log
import rlp
@ -156,7 +156,7 @@ class AccountIndexer(object):
processed += BATCH_SIZE
blockNum = min(blockNum + BATCH_SIZE, self.lastBlock + 1)
cost_time = time.time() - ether.start_time
cost_time = time.time() - ethereum.start_time
print(
"%d blocks processed (in %d seconds), %d unique addresses found, next block: %d"
% (processed, cost_time, count, min(self.lastBlock, blockNum))

@ -10,7 +10,7 @@ from ethereum import utils
from ethereum.block import BlockHeader, Block
from mythril.ethereum.interface.leveldb.state import State
from mythril.ethereum.interface.leveldb.eth_db import ETH_DB
from mythril.ether.ethcontract import ETHContract
from mythril.ethereum.ethcontract import ETHContract
from mythril.exceptions import AddressNotFoundError
# Per https://github.com/ethereum/go-ethereum/blob/master/core/rawdb/schema.go

@ -17,9 +17,9 @@ import solc
from configparser import ConfigParser
import platform
from mythril.ether import util
from mythril.ether.ethcontract import ETHContract
from mythril.ether.soliditycontract import SolidityContract, get_contracts_from_file
from mythril.ethereum import util
from mythril.ethereum.ethcontract import ETHContract
from mythril.solidity.soliditycontract import SolidityContract, get_contracts_from_file
from mythril.ethereum.interface.rpc.client import EthJsonRpc
from mythril.ethereum.interface.rpc.exceptions import ConnectionError
from mythril.support import signatures

@ -1,6 +1,6 @@
import mythril.laser.ethereum.util as helper
from mythril.ether.ethcontract import ETHContract
from mythril.ether.util import get_solc_json
from mythril.ethereum.ethcontract import ETHContract
from mythril.ethereum.util import get_solc_json
from mythril.exceptions import NoContractFoundError

@ -5,14 +5,13 @@ import sys
import json
import logging
from ethereum.utils import sha3
from mythril.ether.ethcontract import ETHContract
from mythril.ether.soliditycontract import SourceMapping
from mythril.exceptions import CriticalError
from mythril.ethereum.ethcontract import ETHContract
from mythril.solidity.soliditycontract import SourceMapping
from mythril.analysis.security import fire_lasers
from mythril.analysis.symbolic import SymExecWrapper
from mythril.analysis.report import Report
from mythril.ether import util
from mythril.ethereum import util
from mythril.laser.ethereum.util import get_instruction_index

@ -1,5 +1,5 @@
from mythril.disassembler.disassembly import Disassembly
from mythril.ether import util
from mythril.ethereum import util
from tests import *

@ -1,5 +1,5 @@
import unittest
from mythril.ether.ethcontract import ETHContract
from mythril.ethereum.ethcontract import ETHContract
class ETHContractTestCase(unittest.TestCase):

@ -1,7 +1,7 @@
from mythril.analysis.callgraph import generate_graph
from mythril.analysis.symbolic import SymExecWrapper
from mythril.ether import util
from mythril.ether.soliditycontract import ETHContract
from mythril.ethereum import util
from mythril.solidity.soliditycontract import ETHContract
from tests import *
import re

@ -1,9 +1,9 @@
from mythril.laser.ethereum.transaction import execute_contract_creation
from mythril.ether import util
from mythril.ethereum import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
from mythril.solidity.soliditycontract import SolidityContract
import tests
from mythril.analysis.security import fire_lasers
from mythril.analysis.symbolic import SymExecWrapper

@ -1,4 +1,4 @@
from mythril.ether.soliditycontract import SolidityContract
from mythril.solidity.soliditycontract import SolidityContract
from mythril.laser.ethereum.state.account import Account
from mythril.laser.ethereum.state.machine_state import MachineState
from mythril.laser.ethereum.state.global_state import GlobalState

@ -1,10 +1,9 @@
from mythril.analysis.report import Report
from mythril.analysis.security import fire_lasers
from mythril.analysis.symbolic import SymExecWrapper
from mythril.ether import util
from mythril.ether.soliditycontract import ETHContract
from mythril.ethereum import util
from mythril.solidity.soliditycontract import ETHContract
from multiprocessing import Pool, cpu_count
import datetime
import pytest
import json
from tests import *

@ -1,6 +1,6 @@
from pathlib import Path
from mythril.ether.soliditycontract import SolidityContract
from mythril.solidity.soliditycontract import SolidityContract
from tests import BaseTestCase
TEST_FILES = Path(__file__).parent / "testdata/input_contracts"

@ -2,8 +2,8 @@ import json
from mythril.analysis.security import get_detection_module_hooks
from mythril.analysis.symbolic import SymExecWrapper
from mythril.analysis.callgraph import generate_graph
from mythril.ether.ethcontract import ETHContract
from mythril.ether.soliditycontract import SolidityContract
from mythril.ethereum.ethcontract import ETHContract
from mythril.solidity.soliditycontract import SolidityContract
from mythril.laser.ethereum.state.account import Account
from mythril.laser.ethereum.state.machine_state import MachineState

@ -1,6 +1,6 @@
# compile test contracts
from pathlib import Path
from mythril.ether.soliditycontract import SolidityContract
from mythril.solidity.soliditycontract import SolidityContract
# Recompiles all the to be tested contracts
root = Path(__file__).parent

Loading…
Cancel
Save