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

[Hacken 2022-12-21 Low #18] State Variable Default Visibility #79

Closed
zlace0x opened this issue Dec 22, 2022 · 0 comments · Fixed by #70
Closed

[Hacken 2022-12-21 Low #18] State Variable Default Visibility #79

zlace0x opened this issue Dec 22, 2022 · 0 comments · Fixed by #70

Comments

@zlace0x
Copy link
Contributor

zlace0x commented Dec 22, 2022

There is no visibility set on rAllowance mapping in the Funnel contract and on deployments mapping in the FunnelFactory contract.

Explicitly labeling the visibility makes it easier to catch incorrect assumptions about who can access the variable.

By default, the variables are marked as public, and the compiler automatically generates view functions that can be unnecessary in this case.

Paths:
./src/Funnel.sol : rAllowance
./src/FunnelFactory.sol : deployments

Recommendation: Variables can be specified as being public, internal, or private. Explicitly define the visibility for all state variables.

Status: New

@zlace0x zlace0x linked a pull request Dec 23, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant