Skip to content

errorSignature="ERC721Metadata__URI_QueryFor_NonExistentToken()" #3221

Discussion options

You must be logged in to vote

@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);
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@akhilparakka
Comment options

Answer selected by alymurtazamemon
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