# deploy

Deploy AVS smart contracts

#### Usage

```bash
otcli network deploy [options]
```

#### Options

<mark style="color:blue;">**--l1-chain**</mark> `required`                                                                                                                           &#x20;

**string**

The name of the L1 chain where the AVS contracts will be deployed.

***

<mark style="color:blue;">**--l2-chain**</mark> `required`                                                                                                                           &#x20;

**string**

Comma-separated list of L2 chain names for deployment (e.g., `base-sepolia,amoy`).

***

<mark style="color:blue;">**--name**</mark> `required`                                                                                                                                      &#x20;

**string**

The name of the AVS (e.g., "my-avs").

***

<mark style="color:blue;">**--rewards-token**</mark> `optional`                                                                                          &#x20;

**eth or** **0xaddress**                                &#x20;

Defines the token used to reward Operators. Values can be `eth` or the address of an ERC-20 token.

***

<mark style="color:blue;">**--l2-rewards**</mark> `optional`                                                                       &#x20;

**flag**

Distribute rewards on L2 instead of L1. If not specified, rewards will be distributed on L1 by default.

**Note:** When specifying this flag for an AVS which has multiple L2 deployments, each deployment manages its own accounting and reward flows separately.

***

<mark style="color:blue;">**--l1-initial-deposit**</mark> `required`                                                               &#x20;

**string (in wei)**

Initial LayerZero fee deposit on the L1 network (e.g., `1000000000000000000` for 1 ETH).

***

<mark style="color:blue;">**--l2-initial-deposit**</mark>  `required`                                                               &#x20;

**string (in wei)**

Initial LayerZero fee deposit on the L2 network.

**Note:** In the case of Multichain deployment, the amount passed to the \`--l2-initial-deposit\` flag will be deposited separately to all L2 chains.

***

<mark style="color:blue;">**--avs-governance-multisig-owner**</mark>  `required`                                                               &#x20;

**0x address**

The address of the **AVS Governance Multisig owner**. If not specified, the deployer address is set as the default owner.

***

<mark style="color:blue;">**--browser-sign**</mark>  `optional`                                                                                                                &#x20;

**flag**

Allows signing using wallets like **MetaMask**, **SAFE**, or other browser-based smart accounts. Ideal for multisig operations and smart contract wallets, especially when users prefer **not to expose private keys directly in the CLI**.

***

<mark style="color:blue;">**--contracts-version**</mark> `optional`                                                                                &#x20;

**string**

Git commit, tag, or branch of the contracts repository to use.

***

<mark style="color:blue;">**--keystore**</mark>  `optional`                                                                   &#x20;

**file path**

Path to the keystore file (for non-interactive use).

***

<mark style="color:blue;">**--keystore-password**</mark> `optional`                                                                       &#x20;

**file path**

Path to the file containing the password for the keystore.

***

<mark style="color:blue;">**--silent, --s, --no-prompt**</mark> `optional`                                                                                          &#x20;

**flag**

Run in non-interactive mode using `.env` and provided arguments.

Othentic CLI uses `.env` files for configuration. For the deployment, you need following variables in your .env file:

{% tabs fullWidth="false" %}
{% tab title="Testnet" %}

```
PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=holesky # Holesky
L2_CHAIN=amoy # Polygon Amoy
```

{% endtab %}

{% tab title="Mainnet" %}

```
PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=mainnet # Ethereum Mainnet
L2_CHAIN=base # Base Mainnet
```

{% endtab %}

{% tab title="Multichain Testnet" %}

```
PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=holesky # Holesky
L2_CHAIN=amoy,base-sepolia # Polygon Amoy, Base Sepolia
```

{% endtab %}

{% tab title="Multichain Mainnet" %}

```
PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=mainnet # Ethereum Mainnet
L2_CHAIN=polygon,base # Polygon PoS, Base Mainnet
```

{% endtab %}
{% endtabs %}

* The private key should be a 64-character hex string without the "0x" prefix.
* Specify `L2_CHAIN` and `L1_CHAIN`&#x20;
  * If both `--l1-chain (command)` and `L1_CHAIN (.env)` are set, the command flag will override the `.env` value.
  * If neither is provided, the default values of `holesky` (or `amoy` as a single L2) are applied.
* You can use `holesky-l2` or `mainnet-l2` as L2 chains if you want to deploy both L1 and L2 contracts on the same chain.
* For [multichain deployment](https://docs.othentic.xyz/main/avs-framework/explainers/multichain), specify network names separated by commas.

***

<mark style="color:blue;">**-h, --help**</mark> `optional`                                                                                    &#x20;

**flag**

Show help information for this command.
