Same shop address can be added multiple times by calling addShop().
The addShop()
function does not check if the shopAddress to be added to valid shops is already a valid shop. This allows to add the same shop unlimited times, with no warnings that make the connectOwner aware of this.
Adding several times the same shop will have two consequences:
On the one hand, the s_kittyShops[]
array will become larger without having any new information, as several slots will contain the same shop address. More gas will be spent both when adding a new shop to the array as well as when reading the shops in the array with the getAllKittyShops()
function.
On the other hand, the ShopPartnerAdded
event will be emitted that many times, which provides no new or useful information for the same reason, the shop address was already valid.
Manual review
Including a check in the addShop()
function that prevents the same address from being added more than once:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.