Why it is recommended to emit the event CreatedNFT before we actually mint the NFT with _safeMint()
#1098
Unanswered
sadityakumar9211
asked this question in
Q&A
Replies: 1 comment
-
|
We only do so, because afterwards we update the token counter, so we use the current tokenId to emit an event, mint the nft, then update the counter. Original code: Otherwise, we could just use a temporary variable: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Why is it recommended to fire the event of
CreatedNFTbefore we even mint the NFT using_safeMintfunction? Am I wrong with this assumption?Beta Was this translation helpful? Give feedback.
All reactions