Omniscia Gnosis Guild Audit
Types Code Style Findings
Types Code Style Findings
TSP-01C: Incorrect Grouping of EqualToAvatar
Operation (Documentation)
Type | Severity | Location |
---|---|---|
Code Style | ![]() | Types.sol:L49 |
Description:
The Operator.EqualToAvatar
operator is a unique operator as it is not expected to have children nor a compValue
.
Example:
35// 05-16: COMPLEX EXPRESSIONS36// paramType: AbiEncoded / Tuple / Array,37// ✅ children38// 🚫 compValue39/* 05: */ Matches,40/* 06: */ ArraySome,41/* 07: */ ArrayEvery,42/* 08: */ ArraySubset,43/* 09: */ _Placeholder09,44/* 10: */ _Placeholder10,45/* 11: */ _Placeholder11,46/* 12: */ _Placeholder12,47/* 13: */ _Placeholder13,48/* 14: */ _Placeholder14,49/* 15: */ EqualToAvatar,
Recommendation:
We advise it to be documented properly, ensuring that the mandatory children
trait is not inferred by the enum's documentation incorrectly.
Alleviation:
The EqualToAvatar
operator has been set to its dedicated "SPECIAL COMPARISON" category, clearly denoting the expected children
and compValue
entries for such operator types.
TSP-02C: Suboptimal Documentation of Enum
Type | Severity | Location |
---|---|---|
Standard Conformity | ![]() | Types.sol:L10-L17 |
Description:
The ParameterType
enum is pivotal to the role modifier's operation of the Gnosis Zodiac ecosystem as it is assumed to always occupy at most 3 bits (i.e. up to 0x07
), a trait that is not necessarily enforced.
Example:
4/**5 * @title Types - a file that contains all of the type definitions used throughout6 * the Zodiac Roles Mod.7 * @author Cristóvão Honorato - <cristovao.honorato@gnosis.io>8 * @author Jan-Felix Schwarz - <jan-felix.schwarz@gnosis.io>9 */10enum ParameterType {11 None,12 Static,13 Dynamic,14 Tuple,15 Array,16 AbiEncoded17}
Recommendation:
We advise the documentation of the ParameterType
enum to be expanded, annotating that the enum
can introduce at most two more data types as otherwise the BufferPacker
function will fail to execute properly. As an alternative, the two remaining parameter slots can be declared similarly to Operator
as placeholders.
Alleviation:
The Gnosis Guild team evaluated this exhibit but has opted to not take any action. As such, we consider this exhibit acknowledged.