suberra / funnel-contracts

Funnels are smart contracts that enforces renewable allowance as a proxy
MIT License
9 stars 0 forks source link

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

Closed zlace0x closed 1 year ago

zlace0x commented 1 year ago

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