SantasList::_mintAndIncrement function modifies the NFT only for the caller and does not accept parameters. It is used in another function that should modifies the recipient's address, but instead modifies msg.sender.It does not take any parameters and implies the following: it always changes only to the caller. This is incorrect, because this function is used in SantasList::buyPresent and it should give NFT to the address passed in the parameters, instead the NFT will be received by msg.sender.
**Every time you call SantasList::buyPresent, the gift will be received by msg.sender. **
This breaks the entire business logic of the protocol, it is impossible to send the gift to someone else.
Add the address to whom you want to mint NFT, then pass this parameter to another function _safeMint to send the gift to the address.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.