Skip to content

Lesson # 14: Error occur while deploying mint.js to the sepolia network. #5564

Discussion options

You must be logged in to vote

@abdullahtanvir11 The issue is clearly mentioned in your error if you try to read it you can easily understand the problem. It says execution reverted: URI Query for the nonexistent token which means the token you are looking for does not exist.

Because you are looking to token id 0 here;

console.log(`Dynamic SVG NFT index 0 tokenURI: ${await dynamicSvgNft.tokenURI(0)}`)

but you minted the token for token id 1

function mintNft(int256 highValue) public {
    s_tokenIdToHighValues[s_tokenCounter] = highValue;
    s_tokenCounter += 1;
    _safeMint(msg.sender, s_tokenCounter);
    emit CreatedNFT(s_tokenCounter, highValue);
}

Here you first increment the token counter and then you mint the t…

Replies: 1 comment 1 reply

Comment options

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

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