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

Detector: State variable that could be declared constant #672

Merged
merged 52 commits into from
Sep 2, 2024

Conversation

TilakMaddy
Copy link
Collaborator

@TilakMaddy TilakMaddy commented Aug 19, 2024

Severity: Low

Qualifications: All solc versions

Logic:

  1. Collect all state variables that are not marked constant or immutable and are also not structs/mappings/contracts (collection A)
  2. Investigate every function and collect all the state variables that could have changed (collection B)
  3. Result = collection A - collection B

@TilakMaddy TilakMaddy marked this pull request as ready for review August 19, 2024 06:12
@TilakMaddy TilakMaddy marked this pull request as draft August 19, 2024 06:48
@TilakMaddy TilakMaddy marked this pull request as ready for review August 19, 2024 06:58
@TilakMaddy TilakMaddy added the priority-high High priority Issue - Tackle this first. label Aug 28, 2024
Copy link
Contributor

@alexroan alexroan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix:

  1. A false negative
  2. Report noise

reports/report.md Outdated Show resolved Hide resolved
@TilakMaddy TilakMaddy marked this pull request as draft August 29, 2024 07:02
@TilakMaddy
Copy link
Collaborator Author

@alexroan

  1. False negative addressed
  2. Noise removed

@TilakMaddy TilakMaddy marked this pull request as ready for review September 2, 2024 07:06
@alexroan alexroan merged commit f55568b into dev Sep 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-high High priority Issue - Tackle this first. state-variable-change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants