# Deploy Example AVS

Deploy your AVS contracts on **Ethereum Holesky** and **Base Sepolia** testnets, using [Simple Price Oracle AVS Example](https://github.com/Othentic-Labs/simple-price-oracle-avs-example).

For other language quickstart implementations, refer to:

* **Go**: [Simple Price Oracle (Go)](https://github.com/Othentic-Labs/simple-price-oracle-avs-go-example)
* **Rust**: [Simple Price Oracle (Rust)](https://github.com/Othentic-Labs/simple-price-oracle-avs-rust-example)

## Prerequisites

1. Othentic CLI installed - [see previous step](https://docs.othentic.xyz/main/welcome/getting-started/install-othentic-cli)
2. Deployer account with balance of:
   1. ≥ 0.3 ETH on **Holesky** (faucets: [1](https://holesky-faucet.pk910.de/), [2](https://cloud.google.com/application/web3/faucet/ethereum/holesky))
   2. ≥ 0.01 ETH on **Base Sepolia** ([faucets](https://docs.base.org/chain/network-faucets#coinbase-developer-platform))

***

{% stepper %}
{% step %}

### Clone the example GitHub repo <a href="#clone-the-github-repository" id="clone-the-github-repository"></a>

Clone the repository:

{% tabs %}
{% tab title="Javascript" %}

```bash
git clone https://github.com/Othentic-Labs/simple-price-oracle-avs-example.git
cd simple-price-oracle-avs-example
rm -rf .git
```

{% endtab %}

{% tab title="Go" %}

```bash
git clone https://github.com/Othentic-Labs/simple-price-oracle-avs-go-example.git
cd simple-price-oracle-avs-go-example
rm -rf .git
```

{% endtab %}

{% tab title="Rust" %}

```bash
git clone https://github.com/Othentic-Labs/simple-price-oracle-avs-rust-example.git
cd simple-price-oracle-avs-rust-example
rm -rf .git
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
From this point onward, we assume all commands run from the root of the Oracle Example directory.
{% endhint %}
{% endstep %}

{% step %}

### Deploy AVS

Run the following command to deploy AVS contracts:

```sh
otcli network deploy \
    --l1-chain holesky \
    --l2-chain base-sepolia \
    --rewards-token eth \
    --l1-initial-deposit 10000000000000000 \
    --l2-initial-deposit 10000000000000000 \
    --name test-avs-name
```

When prompted, enter the private key of the **deployer account**.

The CLI will initiate the AVS contract deployment process. After finishing, it will print out the deployment addresses on both networks.

{% hint style="info" %}

## Please Note:

1. You can deploy on any [supported network](https://docs.othentic.xyz/main/reference/supported-networks) and on [multiple networks](https://docs.othentic.xyz/main/learn/advanced-concepts/multichain) simultaneously.
2. Make sure the Deployer account has at least 0.3 holETH.
   {% endhint %}

{% hint style="warning" %}

## Troubleshooting Errors

If you get an error:

✖ Simulation of deployment failed\
✖ Deployment failed: err: insufficient funds for gas \* price + value: \[...]

It is likely due to spiking gas prices on testnet.

Try getting more funds from a faucet or use a different testnet - `holesky` and `sepolia` are supported.
{% endhint %}
{% endstep %}

{% step %}

### Set your environment variables

To make the CLI aware of your deployment, update your environment variables by running:

```sh
otcli network contracts > .env
```

{% endstep %}
{% endstepper %}

{% hint style="success" %}

## Success!

You've successfully deployed AVS contracts.
{% endhint %}

Next, prepare three **internal** operator accounts for your AVS by running a simple setup script.
