Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

buyPresent function is not correct

Summary

Buy present function is not doing logic that mentioned in description.

Recommendations

Write correct function like this:

function buyPresent(address presentReceiver) external {
if (i_santaToken.balanceOf(msg.sender) < 2e18) {
revert SantasList__NoSantaTokens();
}
i_santaToken.approve(address(this), 2e18);
i_santaToken.burn(msg.sender);
_safeMint(presentReceiver, s_tokenCounter++);
}

i also edited i_santaToken.burn() function to burn 2e18 at one time

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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