There is no check if the treat added by SpookySwap::addTreat()
already exists. Hence it is possible to overwrite existing treats with new ones. On the other hand the `treatNames' variable will still keep track of the old (non-existent) treat
Before adding a new treat to a contract, you should check to see if a treat with the same name already exists and decide whether to overwrite or change the name of the treat.
Users may see more treat than there actually are
Owner may accidentally overwrite uri and cost of existing treat
Foundry test as below
Add code to the SpookySwap::addTreat()
function that checks if treats with the same name exist, according to logic set by the owner.
The function `addTreat` is called by the owner. The owner is trusted. There will be no duplicates.
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.