From 2a5bea003e62decdb52625760622391c6998a4ea Mon Sep 17 00:00:00 2001 From: CJ42 Date: Fri, 12 Jan 2024 09:59:15 +0000 Subject: [PATCH] add extra note about `tokenId` being `bytes32` --- docs/learn/dapp-developer/set-nft-metadata.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/learn/dapp-developer/set-nft-metadata.md b/docs/learn/dapp-developer/set-nft-metadata.md index 798d94719c..2a5536ba8b 100644 --- a/docs/learn/dapp-developer/set-nft-metadata.md +++ b/docs/learn/dapp-developer/set-nft-metadata.md @@ -77,7 +77,7 @@ const lsp8ContractAddress = '0x...'; -### Instantiate the LSP8 contract +## Instantiate the LSP8 contract Create an instance of the LSP8 collection contract as shown below: @@ -104,7 +104,7 @@ const lsp8Contract = new ethers.Contract( -### Send the transaction to set metadata for a tokenId +## Send the transaction to set metadata for a tokenId The last step is to set the metadata for a specific [`tokenId`](../../standards/tokens/LSP8-Identifiable-Digital-Asset.md#format-of-tokenids). You can then send the transaction to set the metadata for the given NFT represented by its `tokenId`. @@ -114,6 +114,8 @@ Here we will use the following parameters as examples: - `dataKey`: [`LSP4Metadata`](../../standards/tokens/LSP4-Digital-Asset-Metadata.md#lsp4metadata) - `metadataValue`: some placeholder value as a [`VerifiableURI`](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md#verifiableuri). +> Note that the `tokenId` is a `bytes32` value (hex) + :::info You can use the `encodeData` function from the [_erc725.js_](../../tools/erc725js/classes/ERC725.md#encodedata) library to encode a `VerifiableURI` easily.