diff --git a/mythril/ether/soliditycontract.py b/mythril/ether/soliditycontract.py index c81da6e8..84a0f1b0 100644 --- a/mythril/ether/soliditycontract.py +++ b/mythril/ether/soliditycontract.py @@ -28,11 +28,11 @@ class SolidityContract(ETHContract): code = file.read() self.solidity_files.append(SolidityFile(filename, code)) + has_contract = False + for key, contract in data['contracts'].items(): filename, name = key.split(":") - has_contract = False - if filename == input_file and len(contract['bin-runtime']): self.name = name self.code = contract['bin-runtime']