Fix Function signatures (#1289)

pull/1307/head
Nikhil Parasaram 5 years ago committed by GitHub
parent d4e97fe7d1
commit fff443f539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      mythril/support/signatures.py

@ -245,8 +245,13 @@ class SignatureDB(object, metaclass=Singleton):
solc_json = get_solc_json(file_path, solc_binary, solc_settings_json)
for contract in solc_json["contracts"][file_path].values():
for name, hash in contract["evm"]["methodIdentifiers"].items():
self.add("0x" + hash, name)
for name, hash_ in contract["evm"]["methodIdentifiers"].items():
sig = "0x{}".format(hash_)
if sig in self.solidity_sigs:
self.solidity_sigs[sig].append(name)
else:
self.solidity_sigs[sig] = [name]
self.add(sig, name)
@staticmethod
def lookup_online(byte_sig: str, timeout: int, proxies=None) -> List[str]:

Loading…
Cancel
Save