errorSignature="ERC721Metadata__URI_QueryFor_NonExistentToken()" #3221
Answered
by
alymurtazamemon
akhilparakka
asked this question in
Q&A
-
When I try to mint the dynamic Nft and return token Uri, this error pops up |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Oct 11, 2022
Replies: 1 comment 1 reply
-
@akhilparakka Make sure in the dynamic nft mint function you increase the counter variable after minting the nft. as can see this; function mintNft(int256 highValue) public {
s_tokenIdToHighValues[s_tokenCounter] = highValue;
_safeMint(msg.sender, s_tokenCounter);
s_tokenCounter = s_tokenCounter + 1; // this should be after _safeMint
emit CreatedNFT(s_tokenCounter, highValue);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alymurtazamemon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@akhilparakka Make sure in the dynamic nft mint function you increase the counter variable after minting the nft.
as can see this;