Omniscia Steer Protocol Audit

VaultRegistry Code Style Findings

VaultRegistry Code Style Findings

VRY-01C: Suboptimal Struct Declaration Style

TypeSeverityLocation
Code StyleVaultRegistry.sol:L256-L262

Description:

The linked declaration style of a struct is using index-based argument initialization.

Example:

contracts/VaultRegistry.sol
256vaults[_deployedAddress] = VaultData(
257 VaultState.PendingThreshold,
258 _tokenId,
259 ++totalVaultCount,
260 _payloadIpfs,
261 _deployedAddress
262);

Recommendation:

We advise the key-value declaration format to be utilized instead, greatly increasing the legibility of the codebase.

Alleviation (200f275c40cbd4798f4a416c044ea726755d4741):

The key-value syntax is now properly utilized for the definition of the struct, greatly enhancing the readability of the creation statement.