EVM printer: fix bug + improve travis test

pull/281/head
Josselin 5 years ago
parent 4074bd36d2
commit b574ad753e
  1. 1
      scripts/travis_test_printers.sh
  2. 3
      slither/analyses/evm/convert.py
  3. 9
      slither/printers/summary/evm.py

@ -12,3 +12,4 @@ if [ $? -ne 0 ]; then
exit 1
fi
slither examples/scripts/test_evm_api.sol --print evm --solc solc-0.5.1

@ -19,6 +19,9 @@ def get_evm_instructions(obj):
slither = obj.slither
if not slither.crytic_compile:
raise SlitherError('EVM features require to compile with crytic-compile')
contract_info = {}
function_info = {}
node_info = {}

@ -1,10 +1,9 @@
"""
Module printing evm mapping of the contract
"""
from slither.printers.abstract_printer import AbstractPrinter
from slither.analyses.evm import generate_source_to_evm_ins_mapping, load_evm_cfg_builder
from slither.utils.colors import blue, green, magenta
from slither.utils.colors import blue, green, magenta, red
class PrinterEVM(AbstractPrinter):
@ -21,6 +20,12 @@ class PrinterEVM(AbstractPrinter):
"""
txt = ""
if not self.slither.crytic_compile:
txt = 'The EVM printer requires to compile with crytic-compile'
self.info(red(txt))
res = self.generate_output(txt)
return res
evm_info = self._extract_evm_info(self.slither)
for contract in self.slither.contracts_derived:

Loading…
Cancel
Save