Invalid TokenId, Lesson 14 #4837
Unanswered
NicolasMazzoleni
asked this question in
Q&A
Replies: 1 comment 9 replies
-
@NicolasMazzoleni Update the token id after minting; _safeMint(msg.sender, s_tokenCounter);
s_tokenCounter += 1; |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Lesson
Lesson 14
Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
https://youtu.be/gyMwXuJrbJQ?t=84834
Operating System
macOS (Apple Silicon)
Describe the bug
Hello guys,
I am facing an issue regarding the deployment of the Lesson 14 DynamicSvgNft.sol contract.
It seams like the override function tokenURI() is not working properly. When a tokenId = 0 is passed as a parameter (when called from the local nodes or when it's deployed on the Goerli testnest, the function is reverted with the custom error.
Here 's a screenshot of the console below.
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "base64-sol/base64.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "hardhat/console.sol"; error DynamicSVGNFT__UnexistenceTokenId(); contract DynamicSVGNFT is ERC721, Ownable {
If you guys have an idea on where I should look for this kind of error.
Thank you !
Nicolas
Beta Was this translation helpful? Give feedback.
All reactions