Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Remove Index Properly

In func. removeBeneficiary beneficiary index is not permanently deleting

In Solidity, when we delete an element at a specific index, it doesn’t actually delete. Instead, it just sets that index value = address(0)

This can cause unexpected behavior, as if we remove one element from array of four, but still it'll count four.

Manual Review While Reading Code

Instead of using remove() use pop()

Updates

Lead Judging Commences

0xtimefliez Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality
0xtimefliez Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.