PatrickAlphaC / hardhat-nft-fcc

102 stars 140 forks source link

event emit value corrected #85

Closed RohanNero closed 1 year ago

RohanNero commented 1 year ago

For the CreatedNFT event to emit the correct value, it needed to be decremented by 1 inside the emit or the s_tokenCounter needed to be incremented after the emit.

This PR fixes it by using the first method.

PatrickAlphaC commented 1 year ago

Thanks! "Correct" is in the eye of the beholder here. Perhaps the devs wanted to emit an event with the new token counter and not the token Id of the newly minted NFT?

However... You're probably right, but to keep the code as close to the video as possible I'm going to close for now.

Thank you for this PR though! And thanks for contributing!

RohanNero commented 1 year ago

Ok I understand, thank you!