Lesson 15: TokenURI undefined. #5664
AtulBlockDev
started this conversation in
General
Replies: 2 comments 12 replies
-
Is
then check the output of values. |
Beta Was this translation helpful? Give feedback.
4 replies
-
@AtulBlockDev Here it is working, just correct these things;
function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
return TOKEN_URI;
}
const { runContractFunction: getTokenURI } = useWeb3Contract({
abi: basicNftAbi,
contractAddress: nftAddress,
functionName: "tokenURI",
params: {
tokenId: tokenId,
},
});
![]() |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I cannot see tokenURI in my frontend console. Stuck here from a long time.
repo
https://github.com/AtulBlockDev/Hardhat-NFT-MarketPlace-FrontEnd (frontend)
https://github.com/AtulBlockDev/hardhat-nft-marketplace(backend)
Beta Was this translation helpful? Give feedback.
All reactions