Update to crytic-compile 4ff24b811095a8d64a16a54e666b59aec2d924da

pull/199/head
Josselin 6 years ago
parent 0856f1ad60
commit 3a65367fd2
  1. 7
      slither/slither.py

@ -6,7 +6,7 @@ import glob
import json import json
import platform import platform
from crytic_compile import CryticCompile from crytic_compile import CryticCompile, InvalidCompilation
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.printers.abstract_printer import AbstractPrinter from slither.printers.abstract_printer import AbstractPrinter
@ -55,7 +55,12 @@ class Slither(SlitherSolc):
self._init_from_raw_json(contract) self._init_from_raw_json(contract)
else: else:
super(Slither, self).__init__('') super(Slither, self).__init__('')
try:
cryticCompile = CryticCompile(contract, **kwargs) cryticCompile = CryticCompile(contract, **kwargs)
except InvalidCompilation as e:
logger.error('Invalid compilation')
logger.error(e)
exit(-1)
for path, ast in cryticCompile.asts.items(): for path, ast in cryticCompile.asts.items():
self._parse_contracts_from_loaded_json(ast, path) self._parse_contracts_from_loaded_json(ast, path)

Loading…
Cancel
Save