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.
16 lines
430 B
16 lines
430 B
7 years ago
|
# compile test contracts
|
||
|
from pathlib import Path
|
||
|
from mythril.ether.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)
|