|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
import mythril.laser.ethereum.util as helper |
|
|
|
|
from mythril.ether.ethcontract import ETHContract |
|
|
|
|
from mythril.ether.util import * |
|
|
|
|
from mythril.ether.util import get_solc_json |
|
|
|
|
from mythril.exceptions import NoContractFoundError |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -54,7 +54,7 @@ class SolidityContract(ETHContract): |
|
|
|
|
# If a contract name has been specified, find the bytecode of that specific contract |
|
|
|
|
|
|
|
|
|
if name: |
|
|
|
|
for key, contract in data['contracts'].items(): |
|
|
|
|
for key, contract in sorted(data['contracts'].items()): |
|
|
|
|
filename, _name = key.split(":") |
|
|
|
|
|
|
|
|
|
if filename == input_file and name == _name and len(contract['bin-runtime']): |
|
|
|
@ -67,7 +67,7 @@ class SolidityContract(ETHContract): |
|
|
|
|
# If no contract name is specified, get the last bytecode entry for the input file |
|
|
|
|
|
|
|
|
|
else: |
|
|
|
|
for key, contract in data['contracts'].items(): |
|
|
|
|
for key, contract in sorted(data['contracts'].items()): |
|
|
|
|
filename, name = key.split(":") |
|
|
|
|
|
|
|
|
|
if filename == input_file and len(contract['bin-runtime']): |
|
|
|
|