# Onchain Art

It's totally possible to mint fully onchain art with Transient contracts!

## Requirements

* Metadata must meet the Transient metadata specs: [metadata-structure](https://docs.transientlabs.xyz/integrations/metadata-structure "mention")
* Total size of the data must be below 24kb
* All uris must be base 64 encoded data uris
  * You can use this tool to convert images to data uris: <https://dopiaza.org/tools/datauri/index.php>
* Generate the JSON by pasting the following template into this tool and then editing the values: <https://www.objgen.com/json>

```
name = title
description = description
image = data:image/jpeg;base64,asgasdgjasdga
media
  size = 1234
  dimensions = 300x300
  mimeType = image/jpeg
```

* Convert this json to a base64 data uri using the [data uri tool](https://dopiaza.org/tools/datauri/index.php) with the following settings:&#x20;
  * ![](https://1627108174-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSXqzr9DuzdAPvEAOtbFK%2Fuploads%2FFo1MYnnHJM5sFZ3IaMgT%2FScreenshot%202025-01-20%20at%201.25.55%E2%80%AFPM.png?alt=media\&token=933b8d9a-f193-429c-94ff-68411b31e205)

## Minting

You must use a block explorer to mint onchain art with Transient contracts.

1. Go to [The Lab](https://lab.transient.xyz) and create a new contract
2. Once deployed, you need to click on the block explorer icon to be taken to the approprite url
   1. ![](https://1627108174-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSXqzr9DuzdAPvEAOtbFK%2Fuploads%2FS5CttJexUX3kWrp9KH6R%2FScreenshot%202025-01-20%20at%201.28.11%E2%80%AFPM.png?alt=media\&token=82285dc8-01de-4cc8-8fa1-a26e01e885f5)
3. Click on the "Contract" tab
4. Click on "Write contract as proxy"
5. Connect your wallet
6. Scroll to the "mint" function
7. Enter in the final data uri (json that is base64 encoded) as the \`uri\`
8. Enter in your address as the \`recipient\`
9. Hit write and send the transaction
10. Done!
