Docs

updateMetadata

Update the metadata of the single token in an NFT Drop (DropERC721) collection For NFT Collection, please use setTokenURI

Example

import { updateMetadata } from "thirdweb/extensions/erc721";
const transaction = updateMetadata({
contract,
targetTokenId: 0n,
newMetadata: {
name: "this is the new nft name",
description: "...",
image: "new image uri",
// ...
},
});

Parameters

Returns

the prepared transaction