Limitation in Receiving Presents via the buyPresent Function
The buyPresent
function's current implementation relies on _mintAndIncrement()
, which in turn exclusively calls _safeMint(msg.sender, s_tokenCounter++)
. Consequently, this process only mints presents for the sender (the one invoking buyPresent), rather than an intended recipient.
This implementation restricts the functionality, as it prevents users from purchasing presents for other accounts.
Foundry
Introduce a new receiver parameter in the buyPresent
function. Modify _mintAndIncrement
function to accept this receiver parameter, enabling the minting for the intended recipients, rather than just the msg.sender
.
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.