slither-optimize: Tool to hint code size optimizations
Open
enhancement
help wanted
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
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
Assessment
This issue has not been assessed yet.