Omniscia Gnosis Guild Audit
PermissionChecker Static Analysis Findings
PermissionChecker Static Analysis Findings
PCR-01S: Literal Equality of bool
Variable
Type | Severity | Location |
---|---|---|
Gas Optimization | ![]() | PermissionChecker.sol:L690 |
Description:
The linked bool
comparison is performed between a variable and a bool
literal.
Example:
packages/evm/contracts/PermissionChecker.sol
690assert(found == true);
Recommendation:
We advise the bool
variable to be utilized directly either in its negated (!
) or original form.
Alleviation:
The literal bool
comparison was replaced by the found
variable's evaluation directly, optimizing the assert
condition's evaluation cost.