> For the complete documentation index, see [llms.txt](https://docs.playground.ooo/degen-engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.playground.ooo/degen-engine/guides/migrating-metadata-for-existing-nft-collections/updating-the-baseuri.md).

# Updating the BaseURI

To update the BaseURI of your NFT collection to our protocol's smart contract address, you must use an admin wallet to call the `setBaseURI` function in your collection's smart contract. Follow the steps below:

1. **Access your collection's smart contract address**: Locate the appropriate blockchain network, such as Ethereum or Polygon. Navigate to the relevant block explorer website (e.g., EtherScan or PolygonScan) and search for your contract address.
2. **Find your NFT collection's smart contract code**: On the block explorer website, click on the contract address and then click on the "Contract" tab to access the smart contract code associated with your collection's NFTs.
3. **Locate the `setBaseURI` function**: In your smart contract's configuration file, find the `setBaseURI` function. This function should accept one parameter—the smart contract address associated with our protocol.
4. **Prepare your admin wallet**: Ensure you have an admin wallet authorized to make changes to your smart contract. This wallet should have sufficient funds to cover gas fees when calling the `setBaseURI` function.
5. **Call the `setBaseURI` function**: Using the admin wallet, call the `setBaseURI` function on your smart contract, passing the smart contract address associated with our protocol as the parameter.
6. **Verify the updated smart contract code**: Ensure the updated smart contract code passes all necessary tests and audits.
7. **Deploy the updated smart contract**: Deploy the updated smart contract to the blockchain network hosting your NFT collection.

After completing these steps, all new NFTs created by your collection will automatically use the BaseURI associated with our protocol's smart contract. This allows buyers to access NFT metadata securely and in a decentralized manner, as metadata will be accessed through the blockchain instead of a centralized server.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.playground.ooo/degen-engine/guides/migrating-metadata-for-existing-nft-collections/updating-the-baseuri.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
