Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Valid

Can't Mint more than once in Huff-code

Summary

Can't Mint more than once in Huff-code

Vulnerability Details

Only mint once and then contract stuck and present "ALREADY_MINTED" revert code.

test suite

function testFailCanMintManyHorseByDifferentUsersHuff()public {
vm.startPrank(maliciousUser);
horseStore.mintHorse();
vm.stopPrank();
console2.log(horseStore.totalSupply());
//revert here with 'ALREADY_MINTED' error
vm.startPrank(user);
horseStore.mintHorse();
vm.stopPrank();
}

Impact

Contract stuck and unable to mint any more NFT.

Tools Used

foundry

Recommendations

Tried create custom total-supply increment function may solve the problem.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Failure to increment total supply on mint

Support

FAQs

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