> For the complete documentation index, see [llms.txt](https://docs.baas.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baas.sh/baas-console/contracts.md).

# Contracts

Register your smart contracts, call and explore them from the Console, and see how each ABI version carries its own mappings and units.

The **Contracts** section is where your project's smart contracts live. You register them, call their functions, explore what BaaS holds for them, and keep track of their ABI versions. Open it from **Explorer → Contracts** in the sidebar.

The page has two tabs. **Contracts** lists your classes: expand one to reach its versions, and a version to reach its deployments. **Explorer** shows what BaaS holds for one deployment at a time.

Contracts you deploy with [`baas deploy`](/baas-cli/deploy.md) are registered here automatically.

## Three levels: class, version, deployment

Every contract in BaaS is organized on three levels, from the general to the specific:

* **Class** is the contract by name, like `MyToken`. Its name is its identifier, unique in your project.
* **Version** is one ABI of the class, labeled with a short id. It carries its own mappings and units, settled when you register it.
* **Deployment** is one address where the version runs, on one network. Several deployments can share a version.

```
MyToken                         (class)
└── a1b2c3d                      (version, one ABI)
      ├── Sepolia   0x1234…       (deployment)
      └── Base      0x5678…       (deployment)
```

{% hint style="info" %}
**One address on two chains is two deployments.** A deployment is identified by its address and its network together, so the same address deployed on Sepolia and on Base is two separate deployments under the same version.
{% endhint %}

## What you can do here

| Where                   | What you do there                                                          | Guide                                                                     |
| ----------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Add Contract**        | Register a contract, or add a deployment or ABI version to an existing one | [Register a contract](/baas-console/contracts/register-a-contract.md)     |
| A **deployment** row    | Read and write that deployment's functions in the **Executor** panel       | [Read and write functions](/baas-console/contracts/read-and-write.md)     |
| The **Explorer** tab    | Browse stored values and decoded events, deployment by deployment          | [Explorer](/baas-console/contracts/explorer.md)                           |
| The **Mappings** button | Review the values a version keeps, and what refreshes them                 | [Mappings](/baas-console/contracts/mappings.md)                           |
| A **version** row       | Open an ABI, or delete the latest version to roll back                     | [Versions and rollback](/baas-console/contracts/versions-and-rollback.md) |

Each class card carries a **Mappings** button. When its latest version keeps mappings, a badge counts them.

## Mappings and units

[Mappings](/baas-console/contracts/mappings.md) decide which on-chain values BaaS keeps for you, and how they stay current. [Units](/baas-console/contracts/units.md) hold the decimals behind your amounts, so a balance reads as `5.0` rather than as a long integer.

## Guides

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Register a contract</strong></td><td>Name the contract, paste the ABI, and add the address and network.</td><td><a href="/baas-console/contracts/register-a-contract.md">Register a contract</a></td></tr><tr><td><strong>Read and write functions</strong></td><td>Read values and send transactions on any deployment.</td><td><a href="/baas-console/contracts/read-and-write.md">Read and write functions</a></td></tr><tr><td><strong>Explorer</strong></td><td>Browse the values BaaS keeps and every decoded event, deployment by deployment.</td><td><a href="/baas-console/contracts/explorer.md">Explorer</a></td></tr><tr><td><strong>Mappings</strong></td><td>The rules that keep on-chain values stored and fresh.</td><td><a href="/baas-console/contracts/mappings.md">Mappings</a></td></tr><tr><td><strong>Units</strong></td><td>The decimals that turn raw integers into amounts you can read.</td><td><a href="/baas-console/contracts/units.md">Units</a></td></tr><tr><td><strong>Versions and rollback</strong></td><td>Browse versions, open any ABI, and roll the latest one back.</td><td><a href="/baas-console/contracts/versions-and-rollback.md">Versions and rollback</a></td></tr></tbody></table>
