Skip to content

Commit

Permalink
Update docs for metadata (#718)
Browse files Browse the repository at this point in the history
* Update docs for metadata

* fix metadata link
  • Loading branch information
iainnash authored Sep 6, 2024
1 parent fd882e7 commit be08f78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions docs/pages/contracts/Metadata.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Contract and Token Metadata


Contract metadata has the following json schema:

```json twoslash
{
"name": "{contract name}",
"description": "{contract description}",
"image": "{contract image}"
}
}
```

Token metadata has the following json schema:
Expand All @@ -30,7 +29,13 @@ Token metadata has the following json schema:
}
```

Contract and token metadata should be pinned to IPFS using a preferred pinning service,
and the url when set on a contract or token should be in an ipfs url format, like: `ipfs://{cid}`
Note that the `image` field should be a mime type starting with `image/`, however, for best rendering support use `png`, `jpg`, or `gif` images. Be aware larger file sizes may have issues rendering but also can display artifacts. It is recommended to test your images first on [testnet](https://testnet.zora.co/) networks and verify the thumbnails and media work.

The `content` field supports _any_ mime type as the base of the NFT and is optional but for strong rendering support please ensure the `animation_url` field is set with an valid mime type (valid file types are: `gltf, glb, webm, mp3, mp4, m4v, ogv, and ogg along with mp3, wav, oga, and .html`).

Contract and token metadata should be pinned to IPFS using a preferred pinning service,
and the url when set on a contract or token should be in an ipfs url format, like: `ipfs://{cid}`.

More information about pinning and pinning services can be found at [ipfs documentation](https://docs.ipfs.tech/how-to/work-with-pinning-services/#use-a-third-party-pinning-service).

Refer to the SDK guide to [contract](/protocol-sdk/metadata/contract-metadata) and [token metadata](/protocol-sdk/metadata/token-metadata) for utilities and sample code to build and pin the json metadata to IPFS.
Refer to the SDK guide to [contract](/protocol-sdk/metadata/contract-metadata) and [token metadata](/protocol-sdk/metadata/token-metadata) for utilities and sample code to build and pin the json metadata to IPFS.
2 changes: 1 addition & 1 deletion docs/vocs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default defineConfig({
},
{
text: "Contract and Token Metadata",
link: "/contracts/metadata",
link: "/contracts/Metadata",
},
{
text: "Creating a Token",
Expand Down

0 comments on commit be08f78

Please sign in to comment.