Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[False-Positive]: unused-state should not apply to abstract contracts #1885

Closed
PaulRBerg opened this issue May 3, 2023 · 1 comment
Closed

Comments

@PaulRBerg
Copy link
Contributor

Describe the false alarm that Slither raise and how you know it's inaccurate:

This issue is analogous to #1883 and #1884, but it is about unused-state.

The unused-state detector should not apply to constants defined in abstract contracts. As an example, let's look at the constants in my base script in PRBProxy:

https://github.com/PaulRBerg/prb-proxy/blob/0021babcc102e773ed2d6f67a937b1e368459cf7/script/shared/Base.s.sol#L6C1-L11

It does not make sense for Slither to complain that ZERO_SALT is unused, but it does:

https://github.com/PaulRBerg/prb-proxy/security/code-scanning/50

Frequency

Very Frequently

Code example to reproduce the issue:

https://github.com/PaulRBerg/prb-proxy/blob/0021babcc102e773ed2d6f67a937b1e368459cf7/script/shared/Base.s.sol

Version:

v0.9.3

Relevant log output:

No response

@0xalpharush
Copy link
Contributor

closed by #1952

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants