Skip to content

Commit

Permalink
add extra note about tokenId being bytes32
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Jan 12, 2024
1 parent 4fd69f5 commit 2a5bea0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/learn/dapp-developer/set-nft-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const lsp8ContractAddress = '0x...';
</TabItem>
</Tabs>

### Instantiate the LSP8 contract
## Instantiate the LSP8 contract

Create an instance of the LSP8 collection contract as shown below:

Expand All @@ -104,7 +104,7 @@ const lsp8Contract = new ethers.Contract(
</TabItem>
</Tabs>

### 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`.

Expand All @@ -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.
Expand Down

0 comments on commit 2a5bea0

Please sign in to comment.