Implementation of the HorseStore.huff::MINT_HORSE()
function does not load properly the total supply value used to determine the token ID, causing Denial-of-Service (DoS) as it allows only one NFT ever to be minted.
When minting a horse NFT, assigning a unique token ID to each minted NFT is crucial. In the case of the HorseStore.huff::MINT_HORSE()
function, the total supply value is used to determine the token ID. However, there is an issue with the function that causes it not to load the total supply value correctly. As a result, the function assigns the same token ID of 0
to every minted NFT, which causes the transaction to fail with the error message ALREADY_MINTED
. This issue prevents the successful minting of subsequent NFTs after the first one.
Only one NFT can ever be minted.
Add the next test in HorseStoreHuff.t.sol
.
Run a test with forge test --mt test_MintingHorseRevertsAfterFirstSuccessfulMint
.
Foundry
The value stored at the TOTAL_SUPPLY
storage slot must be loaded properly.
Recommended changes to HorseStore.huff::MINT_HORSE()
function:
Add the next test in HorseStoreHuff.t.sol
.
Run a test with forge test --mt test_MintMultipleHorses
.
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.