Omniscia rain protocol Audit
TrustFactory Code Style Findings
TrustFactory Code Style Findings
TFY-01C: Non-Standard Implementation Deployment Check
Type | Severity | Location |
---|---|---|
Code Style | TrustFactory.sol:L42 |
Description:
The linked implementation check is non-standard as it is not reflected in the other factory-suffixed contracts.
Example:
contracts/trust/TrustFactory.sol
37/// Build the reference implementation to clone for each child.38/// @param config_ All configuration for the `TrustFactory`.39constructor(TrustConstructionConfig memory config_) {40 address implementation_ = address(new Trust(config_));41 // This silences slither.42 require(implementation_ != address(0), "TRUST_0");43 emit Implementation(msg.sender, implementation_);44 implementation = implementation_;45}
Recommendation:
We advise behaviour to be streamlined across all contracts by either setting the check in the remaining contracts or omitting it from the referenced contract.
Alleviation:
The non-standard require
check was omitted from the codebase thereby standardizing it.