> For the complete documentation index, see [llms.txt](https://silika-studio.gitbook.io/opal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://silika-studio.gitbook.io/opal/objects/layers.md).

# Layers

Layers are individual assets that, when combined, produce token artwork

## Storage

### Tableland

The `Layers` table in Tableland has the following schema:

```json
{
    "id": integer (PK)
    "trait_type": text
    "value": text
    "cid": text
    "rarity_weighting": integer
    "order": integer
    "created_at": text
}
```

* `id`: Integer (primary key) representing the row of the entry
* `trait_type`: Category for the type within the context of the collection (e.g., background, eyes, face, etc.)
* `value`: Specific layer string identifier of a category within trait\_type (e.g., blue, sleepy, surprised, etc.)
* `cid`: IPFS content hash for the layer artwork. This hash is inserted into an IPFS gateway in the Opal UI to fetch the content from IPFS
* `rarity_weighting`: Integer representing how a layer should be weighted in terms of frequency within the collection. For example, consider two background colors: red and blue. The rarity weighting for red is 3 while that for blue is 7. This means that, theoretically, the red background will appear in the collection $$\frac{3}{3+7} = 30%$$ of the time.
* `order`: Integer representing order in which the layer appears relative to the other layers (e.g., background is 1, body is 2, face is 3, eyes is 4, etc.)
* `created_at`: Date at which the layer was uploaded to the Opal UI
