Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
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.
 
 
 
 
 
 
mythril/tests/testdata/compile.py

15 lines
431 B

# compile test contracts
from pathlib import Path
from mythril.solidity.soliditycontract import SolidityContract
# Recompiles all the to be tested contracts
root = Path(__file__).parent
input = root / "input_contracts"
output = root / "inputs"
for contract in input.iterdir():
sol = SolidityContract(str(contract))
code = sol.code
output_file = output / "{}.o".format(contract.name)
output_file.write_text(code)