Closed chasebrownn closed 5 months ago
The invocation of the VotingEscrowVesting::_removeTokenFromDepositorEnumeration function is always followed by a delete of the vestingSchedules entry associated with the tokenId.
VotingEscrowVesting::_removeTokenFromDepositorEnumeration
delete
vestingSchedules
tokenId
_removeTokenFromDepositorEnumeration(msg.sender, tokenId); delete vestingSchedules[tokenId];
We advise the delete statement to be relocated to the VotingEscrowVesting::_removeTokenFromDepositorEnumeration function, optimizing the bytecode size of the contract.
Resolved
VEV-02C: Optimization of Deposit Enumeration Removal
Description:
The invocation of the
VotingEscrowVesting::_removeTokenFromDepositorEnumeration
function is always followed by adelete
of thevestingSchedules
entry associated with thetokenId
.Example:
Recommendation:
We advise the
delete
statement to be relocated to theVotingEscrowVesting::_removeTokenFromDepositorEnumeration
function, optimizing the bytecode size of the contract.