Omniscia DAFI Protocol Audit
BscBridgeOptimized Static Analysis Findings
BscBridgeOptimized Static Analysis Findings
BBO-01S: Redundant bool
Variable Comparison
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | BscBridgeOptimized.sol:L128, L141, L229 |
Description:
The linked statements perform a direct comparison between a bool
variable and a bool
literal.
Example:
contracts/BscBridgeOptimized.sol
229if (!(currentOwner > lastOwner && validators[currentOwner] == true))
Recommendation:
We advise the bool
variable to be utilized directly instead either in its normal or negated (!
) form.
Alleviation:
The comparison was updated only for the last of the linked instances thereby partially alleviating the exhibit.