mirror of https://github.com/ConsenSys/mythril
blockchainethereumsmart-contractssoliditysecurityprogram-analysissecurity-analysissymbolic-execution
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
848 B
24 lines
848 B
5 years ago
|
from mythril.mythril import MythrilAnalyzer, MythrilDisassembler
|
||
|
from mythril.ethereum import util
|
||
|
from mythril.solidity.soliditycontract import EVMContract
|
||
|
from tests import TESTDATA_INPUTS
|
||
|
|
||
|
|
||
|
def test_statespace_dump():
|
||
|
for input_file in TESTDATA_INPUTS.iterdir():
|
||
|
if input_file.name not in ("origin.sol.o", "suicide.sol.o"):
|
||
|
# It's too slow, so it's better to skip some tests.
|
||
|
continue
|
||
|
contract = EVMContract(input_file.read_text())
|
||
|
disassembler = MythrilDisassembler()
|
||
|
disassembler.contracts.append(contract)
|
||
|
analyzer = MythrilAnalyzer(
|
||
|
disassembler=disassembler,
|
||
|
strategy="dfs",
|
||
|
execution_timeout=5,
|
||
|
max_depth=30,
|
||
|
address=(util.get_indexed_address(0)),
|
||
|
)
|
||
|
|
||
|
analyzer.dump_statespace(contract=contract)
|