re-al-Foundation / rwa-contracts

0 stars 0 forks source link

[VEV-01C] Non-Uniform Mapping Declaration Style #102

Closed chasebrownn closed 5 months ago

chasebrownn commented 5 months ago

VEV-01C: Non-Uniform Mapping Declaration Style

Type Severity Location
Code Style VotingEscrowVesting.sol:L54

Description:

The referenced mapping utilizes a named value type, however, all other declarations do not do so across the codebase.

Example:

/// @dev Maps `owner` address to an array of tokenIds the address deposited into contract.
mapping(address owner => uint256[]) public depositedTokens;
/// @dev Maps `tokenId` to index of which token resides in depositedTokens array.
mapping(uint256 tokenId => uint256) public depositedTokensIndex;
/// @dev Maps `tokenId` to the token's vesting schedule.
mapping(uint256 tokenId => VestingSchedule) public vestingSchedules;
/// @dev Maps `tokenId` to the `owner` address that deposited token.
mapping(uint256 tokenId => address owner) public depositors;

Recommendation:

We advise the named declaration to be omitted, ensuring a uniform mapping declaration style across the code.

chasebrownn commented 5 months ago

Acknowledged