crytic/slither

slither-optimize: Tool to hint code size optimizations

Open

#809 aperta il 25 mar 2021

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Python (886 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (4769 star)
Metriche merge PR
 (Merge medio 54g 9h) (2 PR mergiate in 30 g)

Descrizione

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)

Guida contributor