Omniscia Gnosis Guild Audit

Code Style

Code Style

During the manual portion of the audit, we identified 22 optimizations that can be applied to the codebase that will decrease the operational cost associated with the execution of a particular function and generally ensure that the project complies with the latest best practices and standards in Solidity.

Additionally, this section of the audit contains any opinionated adjustments we believe the code should make to make it more legible as well as truer to its purpose.

These optimizations are enumerated below:

IDSeverityAddressedTitle
BPR-01CLoop Iterator Optimization
CSN-01CInefficient Lookup Operation of Consumptions
IYT-01CContent Validation Grouping
IYT-02CLoop Iterator Optimizations
IYT-03CRedundant Validation of Sub-Type Tree
MSU-01CDeprecated if-revert Pattern
MSU-02CNon-Standard Definition of Function Signature
PRE-01CLoop Iterator Optimizations
PRE-02COptimization of Array Iteration
PYR-01CRedundant Code Duplication
PBR-01CSuboptimal Struct Declaration Styles
PCR-01CInefficient Iteration of Child Conditions
PCR-02COptimization of Data Extraction
PTR-01CInefficient mapping Lookups
RSE-01CInefficient Transfer of Ownership
RSE-02CLoop Iterator Optimization
TYG-01CIneffectual Usage of Safe Arithmetics
TYG-02CLoop Iterator Optimization
TSP-01CIncorrect Grouping of EqualToAvatar Operation (Documentation)
TSE-01CMultiple Top-Level Declarations
TSP-02CSuboptimal Documentation of Enum
WOE-01CMultiple Top-Level Declarations