# Collection Metadata

On Flow, metadata doesn't exclusively exist on NFTs. They can also exist on the contract itself by implementing the [ViewResolver](https://github.com/onflow/flow-nft/blob/master/contracts/ViewResolver.cdc) interface. Flowty expects the following metadata to exist on the contract level:

* **NFTCollectionData:** How do I store, send, or withdraw from this collection?
* **NFTCollectionDisplay:** How should a collection be shown?
* **ExternalURL (Optional):** A backlink to a collection's native website/app

If you came here from an earlier section, you might recall that NFTs themselves can also specify NFTCollectionData and NFTCollectionDisplay. While it is valid to define each of them on the NFT, contract-level metadata takes precedence and is the recommended location to implement these views.&#x20;

In order to ensure consistency and maximum capability with other products on Flow, we recommend that NFTs on your collection also use your contract-level resolver. You can find an example of this in our Avataaars contract[ here](https://github.com/Flowtyio/avataaars/blob/81e6342722ad59b129e6134dcdb9cca963763209/contracts/Avataaars.cdc#L139), and below:

<details>

<summary>Sample</summary>

```
        pub fun resolveView(_ view: Type): AnyStruct? {
            switch view {
                ...
                case Type<MetadataViews.NFTCollectionData>():
                    return Avataaars.resolveView(view)
                case Type<MetadataViews.NFTCollectionDisplay>():
                    return Avataaars.resolveView(view)
                ...
            }
            return nil
        }
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowty.io/developer-docs/nft-metadata-standard/collection-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
