> 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/register-a-contract.md).

# Register a contract

Register a deployed contract from the Add Contract panel, including new classes, extra deployments, and new ABI versions.

Registering a contract lets you call it from the Console and use it in your automations. In this guide, you register `MyToken`, an ERC-20 already deployed on your project's own network.

{% hint style="info" %}
**Deploying with the CLI registers for you.** [`baas deploy`](/baas-cli/deploy.md) records the class, version, and deployment on confirmation, so a CLI-deployed contract is already here. This page is for contracts you deployed another way, or for a deployment the CLI couldn't register.
{% endhint %}

## Register from the panel

{% stepper %}
{% step %}

### Open the panel

In **Explorer → Contracts**, click **Add Contract**. On your first visit, the page reads "No contracts" and offers the same button.
{% endstep %}

{% step %}

### Name the class

Under **Contract Name (Class)**, choose **Add new contract** and type a name, for example `MyToken`. This name is how you refer to the contract everywhere in your project.

To add to a contract you already have, pick it from the list instead. See [Add a deployment to an existing class](#add-a-deployment-to-an-existing-class) below.
{% endstep %}

{% step %}

### Point at the deployment

Fill in **Deployment Address** with the `0x` address, in any casing, BaaS stores it in checksum form, then pick the **Chain** it runs on. In our example, the `MyToken` address, on your project's network.
{% endstep %}

{% step %}

### Paste the ABI

Paste the contract's ABI into **ABI (JSON)**, the full JSON array your compiler produced.

Every function and event input needs a name, tuple members included. Outputs can stay unnamed.

An unnamed input is rejected. Name it in your Solidity source and rebuild, or type a name like `arg0` into the pasted JSON.
{% endstep %}

{% step %}

### Open Expert settings, if you need them

Left alone, they let BaaS detect what your ABI supports. Fill them to decide the [mappings and units](#expert-settings) of this version yourself.
{% endstep %}

{% step %}

### Register

Click **Add Contract**. This creates the class, its first version, and the deployment together. `MyToken` arrives with the [mappings](/baas-console/contracts/mappings/automatic-mappings.md) and [units](/baas-console/contracts/units/automatic-units.md) of the standards BaaS recognized.
{% endstep %}
{% endstepper %}

## Expert settings

**Expert settings** holds two editors, **Personalised mappings (JSON)** and **Personalised units (JSON)**, shown whenever the ABI field is yours to fill.

Left empty, they let detection do the work. Fill one and it replaces the detected set entirely, for that ABI version, with no way to edit it afterwards.

Each editor has its own guide:

* [Custom mappings](/baas-console/contracts/mappings/custom-mappings.md): the values BaaS keeps for you.
* [Custom units](/baas-console/contracts/units/custom-units.md): the decimals behind your amounts.

To switch a set off, declare it empty: `{}` for mappings, and `{"definitions": {}, "functions": [], "events": []}` for units.

## After you register

BaaS registers the deployment when the chain is supported, the ABI is valid (every input named, no signature declared twice) and a contract is deployed at that address. Its values and decimals are read right away.

## Add a deployment to an existing class

A contract often runs at several addresses, sometimes the same address across networks. To record one, open **Add Contract** and pick the class from **Contract Name (Class)**. Its latest ABI loads and locks, so you fill in only the new **Deployment Address** and **Chain**, then submit.

The deployment joins the class under its latest version, and inherits the mappings and units that version already carries. Each address is registered once per chain, so the same address on two networks gives you two deployments.

## Push a new ABI version

A changed ABI is a new version of the class. In **Add Contract**, pick the class, then add the new **Deployment Address** and **Chain**. Click the **Push new version of ABI** overlay on the locked ABI field, paste the new ABI, and submit.

The new version becomes the latest, with mappings and units of its own, detected or declared.

{% hint style="info" %}
**Same ABI, same version.** Re-submitting the same ABI reuses its version; any change creates a new one.
{% endhint %}

## Next

* [Read and write functions](/baas-console/contracts/read-and-write.md): call the contract you just registered.
* [Mappings](/baas-console/contracts/mappings.md): see the values BaaS keeps current for you.
* [Versions and rollback](/baas-console/contracts/versions-and-rollback.md): review versions and roll one back.
