slither icon indicating copy to clipboard operation
slither copied to clipboard

Include _get_source_code into Function class

Open shortdoom opened this issue 1 year ago • 0 comments

Describe the desired feature

even if not used by any printer because of how cli formatting works with PrettyTables, it's actually a useful method to have accessible when working with Python API directly, currently this method is located only in

https://github.com/crytic/slither/blob/e3dcf1ecd3e9de60da046de471c5663ab637993a/slither/printers/summary/constructor_calls.py#L11

forcing any python script to import it using the following path

from slither.printers.summary.constructor_calls import _get_source_code

_get_source_code function would be better located inside of a Function class. increased function visibility in the codebase will also save developers time on asking chatgpt how to regex solidity function.

shortdoom avatar Nov 16 '23 19:11 shortdoom