crytic/slither

slither-optimize: Tool to hint code size optimizations

Open

#809 geöffnet am 25. März 2021

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (886 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (4.769 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 54T 9h) (2 gemergte PRs in 30 T)

Beschreibung

More and more people are reaching the code size limit, even with optimizers enabled. We can create a tool based on slither that will highlight some optimizations to reduce the code size.

Example:

  • Replace modifiers with internal calls (we need to investigate the limit when this becomes efficient)
  • Regroup duplicate code with internal functions
  • Find if a parameter is always the same in all the internal calls
  • How to split a contract into multiple ones (see https://github.com/crytic/slither/issues/471)
  • ...

We can also create automatic patches for some rules (ex: modifier to internal calls)

Contributor Guide