Slither Warning for Preventing Dead Code in Runtime Bytecode
Open
enhancement
new detector
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the desired feature
In solc `<0.8.19` releases and in the default legacy code generation, when an internal library function or a free function accessed via a module was called only during contract creation, e.g. only in the constructor, a copy of the function still also occurred in the contract's runtime bytecode. See [here](https://blog.soliditylang.org/2023/02/22/solidity-0.8.19-release-announcement/) for more information. I think it would be a value-add to having Slither issue such a warning for affected codebases.
Contributor guide
Assessment
This issue has not been assessed yet.