Updates format_constant_function to use filename_absolute. test_constant_function passes.

pull/238/head
rajeevgopalakrishna 6 years ago
parent 106928f911
commit c25649eda0
  1. 2
      utils/slither_format/format_constant_function.py

@ -13,7 +13,7 @@ class FormatConstantFunction:
if not Found:
for function in contract.functions:
if contract.name == element['contract']['name'] and function.name == element['name']:
FormatConstantFunction.create_patch(slither, patches, element['source_mapping']['filename'], ["view","pure","constant"], "", int(function.parameters_src.split(':')[0]), int(function.returns_src.split(':')[0]))
FormatConstantFunction.create_patch(slither, patches, element['source_mapping']['filename_absolute'], ["view","pure","constant"], "", int(function.parameters_src.split(':')[0]), int(function.returns_src.split(':')[0]))
Found = True
@staticmethod

Loading…
Cancel
Save