Skip to content

Why it is recommended to update the s_tokenCounter before calling _safeMint(address, uint256) function? #1091

Discussion options

You must be logged in to vote

I checked the GitHub repo associated with the tutorial. I think @PatrickAlphaC meant that emitting the event CreatedNFT is recommended before we actually minting the token by calling _safeMint() function. I think he incorrectly pointed in the video at 23:24:16 about incrementing the _tokenCounter before calling the_safeMint()` function.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@sadityakumar9211
Comment options

@krakxn
Comment options

@sadityakumar9211
Comment options

@krakxn
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sadityakumar9211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants