NFT Dealers

First Flight #58
Beginner FriendlyFoundry
100 EXP
Submission Details
Impact: low
Likelihood: high

revealCollection() missing event

Author Revealed upon completion

Root + Impact

Description

  • NFTDealers::revealCollection() does not emit an event, making it difficult to track when selling and buying NFTs becomes possible.

function revealCollection() external onlyOwner {
isCollectionRevealed = true;
@> //missing event here
}

Impact:

  • Without a CollectionRevealed event, any off-chain service or user interface that needs to know whether the collection has been revealed would have to actively query the isCollectionRevealed state variable to get the current value. This is less efficient than simply listening for a CollectionRevealed event, and it can lead to delays in detecting when the collection becomes available.

    The impact of this could be significant because isCollectionRevealed gates the entire minting process. If the collection is revealed and an off-chain service or user is not aware of the change because they didn't query the contract state at the right time, they could miss the minting window or fail to react promptly to the collection going live.

Recommended Mitigation

Adding event to let off-chain interactions to know when collection is revealed

+ event CollectionRevealed();
function revealCollection() external onlyOwner {
isCollectionRevealed = true;
+ emit CollectionRevealed()
}

Support

FAQs

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

Give us feedback!