While the Solidity version of the HorseStore
NFT collection only returns a token URI if the NFT has been minted, this is not true for the Huff version.
Even though the token URI doesn't seem to be important for this NFT collection, the Huff logic when an NFT is not minted is different between the Solidity and the Huff versions.
Foundry and manual analysis.
Add the following test function to the Base_Test.t.sol
file:
Then run: forge test --mt testMetadata -vvvv
It is possible to observe that the Solidity version reverts with an error ERC721NonexistentToken
while the Huff version returns "" as if the token existed.
Before returning any token URI, it is recommended to check whether the NFT has been minted or not like in the Solidity version.
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.