crytic / tealer

Static Analyzer for Teal
GNU Affero General Public License v3.0
62 stars 14 forks source link

Use Functions for txn context analysis and update detectors to use Tealer obj #182

Closed S3v3ru5 closed 1 year ago

S3v3ru5 commented 1 year ago

PR achieves three things:

  1. Updates Transaction context analysis to run on a single Function instead of the entire contract.
  2. Adds utils to create a Tealer object for a single contract. The command line options handler (main.py) is updated to create the Tealer object from the given contract.
  3. The detectors are updated to take in a Tealer object instead of the Teal object. Currently, the detectors ignore the group transaction structure and work on the individual "Functions" of the transaction.

All changes in the PR contribute to one of above three things.

The next steps would be decide on the output format for a group transaction config and updating detectors/utils.py to consider group transaction structure while detecting vulnerable paths. Next, updating the command line to take multiple contracts or the group config and work from it.