updateMetadata

Update the metadata of the single token in an Edition Drop (DropERC1155) collection For Edition contracts, use setTokenURI

Example

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

Parameters

Returns

the prepared transaction