Judge has assessed an item in Issue #107 as 2 risk. The relevant finding follows:
[06] maxGeneration check included for forging a new NFT but not included when minting a new NFT
TraitForgeNft::forge includes the following check to ensure that maxGeneration is not exceeded:
require(newGeneration <= maxGeneration, "can't be over max generation");
However, this check is not explicitly included in the TraitForgeNft::mintToken , TraitForgeNft::mintWithBudget and TraitForgeNft::_mintInternal functions. Without the explicit checks, the maxGeneration could be exceed for mints.
Recommended Mitigation Steps
Consider including the maxGeneration check explicitly for mint functions.
Judge has assessed an item in Issue #107 as 2 risk. The relevant finding follows:
[06] maxGeneration check included for forging a new NFT but not included when minting a new NFT TraitForgeNft::forge includes the following check to ensure that maxGeneration is not exceeded:
require(newGeneration <= maxGeneration, "can't be over max generation"); However, this check is not explicitly included in the TraitForgeNft::mintToken , TraitForgeNft::mintWithBudget and TraitForgeNft::_mintInternal functions. Without the explicit checks, the maxGeneration could be exceed for mints.
Recommended Mitigation Steps Consider including the maxGeneration check explicitly for mint functions.