Omniscia rain protocol Audit
ERC20BalanceTierFactory Code Style Findings
ERC20BalanceTierFactory Code Style Findings
ERF-01C: Suboptimal Visibility Specifier
Type | Severity | Location |
---|---|---|
Language Specific | ERC20BalanceTierFactory.sol:L13 |
Description:
The implementation
visibility specifier of the ERC20BalanceTierFactory
is set as private
disallowing users to inspect the actual implementation the factory deploys instances from.
Example:
contracts/tier/ERC20BalanceTierFactory.sol
11/// Template contract to clone.12/// Deployed by the constructor.13address private implementation;14
15/// Build the reference implementation to clone for each child.16constructor() {17 address implementation_ = address(new ERC20BalanceTier());18 emit Implementation(msg.sender, implementation_);19 implementation = implementation_;20}
Recommendation:
We advise it to be set as public
given that it will be a frequently queried member of the contract that would otherwise be slightly inconvenient to access if done so by inspecting the contract's constructor
.
Alleviation:
The visibility specifier has been updated to public
ensuring a more transparent approach to the factory.