# Create AVS

{% embed url="<https://youtu.be/_9xSxsEj9kg>" %}

## Getting Ready

Make sure you have Holesky Testnet ETH. You can get hold of some Holesky ETH by requesting tokens from any of the faucets listed below:

* [https://cloud.google.com/application/web3/faucet/ethereum/holesky<br>](https://cloud.google.com/application/web3/faucet/ethereum/holesky)
* [https://holesky-faucet.pk910.de/<br>](https://holesky-faucet.pk910.de/)
* [https://faucet.quicknode.com/ethereum/holesky<br>](https://faucet.quicknode.com/ethereum/holesky)

## Creating an AVS via Wizard

1. Head over to [https://wizard.altlayer.io/](https://wizard.altlayer.io/login)

<figure><img src="https://3112893033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8DRtEPgHrIg4b65B1smQ%2Fuploads%2F3CgCysHncXxH0BX4wdFQ%2Fimage.png?alt=media&#x26;token=fe19a1fb-21a0-40e1-8a3d-9933ee5d490f" alt=""><figcaption></figcaption></figure>

2. Log in using your Google credentials. Once you are logged in, you will be asked to create an organisation. Type in your organisation name and click "create". Later, you will be able to add your fellow team members to your organisation. Organisation team members can view and manage your deployed AVS.
3. Click on “New AVS” to start deploying a new AVS.

<figure><img src="https://3112893033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8DRtEPgHrIg4b65B1smQ%2Fuploads%2Fltbxs8nynKb0u9ohC9Ns%2Fimage.png?alt=media&#x26;token=bb40d943-ba72-4e46-9e97-42917febf96d" alt=""><figcaption></figcaption></figure>

4. To deploy a new AVS, do the following step and then click on "Submit" after confirming the details on the summary panel:
   1. Type in your preferred AVS name
   2. Choose a service manager template as your AVS type
      1. You can either choose to deploy a preloaded AVS template that is provided by us, such as Hello World (ECDSA), AltLayer Mach (BLS), or Bridge (BLS) etc.; OR
      2. Choose to deploy a Custom AVS (either ECDSA or BLS). To deploy a Custom AVS, you have to paste a [flattened ](https://book.getfoundry.sh/reference/forge/forge-flatten)version of your service manager contract to the editor. \
         \
         Do note that your custom AVS contract must implement the `IServiceManager` interface. This ensures that the AVS can be indexed, managed, and interacts properly with both EigenLayer and AltLayer services. Below are the details for the primary interfaces:
         1. **`IServiceManager`**\
            The `IServiceManager` interface forms the main point of interaction for an AVS to push updates to the EigenLayer rewards system. It is an extension of `IServiceManagerUI` and includes functionalities to create reward submissions and manage operator interactions.
            * **Source File:** [`IServiceManager`](https://github.com/Layr-Labs/eigenlayer-middleware/blob/v0.2.0-mainnet-rewards/src/interfaces/IServiceManager.sol)
         2. **`IServiceManagerUI`**\
            This interface outlines the required user interface functionalities that every AVS should provide. It includes the following functionalities:
            * Updating the metadata URI
            * Registering and deregistering operators with the AVS
            * Fetching restaked strategies for operators
            * Providing the list of restakable strategies
            * **Source File:** [`IServiceManagerUI`](https://github.com/Layr-Labs/eigenlayer-middleware/blob/v0.2.0-mainnet-rewards/src/interfaces/IServiceManagerUI.sol)
         3. **\[Optional] `IOperatorAllowlist`**\
            To further enhance security and control over which operators can interact with the AVS, the `IOperatorAllowlist` interface can be optionally implemented. This allows the AVS to dynamically manage a list of approved operators who can register and participate. AVS that do not wish to impose restrictions on operators can ignore this feature.

            * **Source File:** [`IOperatorAllowlist`](https://github.com/alt-research/wizard-templates/blob/731aa353758f64f55f709f9acff0a1df3e862731/src/interfaces/IOperatorAllowlist.sol)

            You can easily inherit and use the `OperatorAllowlist` implementation from the template provided in [this repository](https://github.com/alt-research/wizard-templates/blob/731aa353758f64f55f709f9acff0a1df3e862731/src/templates/OperatorAllowlist.sol).<br>
      3. Last but not least, you have to compile the code on the Wizard UI and enter your custom arguments. Finally, you can continue with the deployment process.

**How to deploy a Custom BLS AVS**

{% embed url="<https://www.youtube.com/watch?v=o-fr5IliO8s>" %}

**How to deploy a Custom ECDSA AVS**

{% embed url="<https://www.youtube.com/watch?v=N1xBcIXe5rQ>" %}

5. Select your preferred supported restaked strategies for this AVS

<figure><img src="https://3112893033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8DRtEPgHrIg4b65B1smQ%2Fuploads%2FCME42igERoR5uMwGAkph%2Fimage.png?alt=media&#x26;token=04b3018a-6f20-493e-a38f-e6758087a0ea" alt=""><figcaption></figcaption></figure>

6. To start the deployment process, you will need to connect your Ethereum wallet (e.g., MetaMask) to continue.

<figure><img src="https://3112893033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8DRtEPgHrIg4b65B1smQ%2Fuploads%2F4pkjgzhhMK6PQfMcj30A%2Fimage.png?alt=media&#x26;token=55aa9028-114d-43d5-bbb7-0ce67875dae0" alt=""><figcaption></figcaption></figure>

7. The first step is to deploy the AVS base contracts. Click on “Deploy” and confirm the transaction in your Ethereum wallet. Once the transaction is included in the blockchain, you will receive a deployment confirmation.

<figure><img src="https://3112893033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8DRtEPgHrIg4b65B1smQ%2Fuploads%2FkUBvrhRsLXx9v1hwIuyW%2Fimage.png?alt=media&#x26;token=346bc94a-1974-4233-ac08-d4bd64d70d19" alt=""><figcaption></figcaption></figure>

8. Next, you will be prompted to deploy the selected AVS service manager template contract. Similarly, click " Deploy " to confirm the Ethereum wallet transaction. You will get a deployment confirmation once the blockchain includes the transaction.

<figure><img src="https://3112893033-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8DRtEPgHrIg4b65B1smQ%2Fuploads%2FrXYO7OjTlh1iHnfKY6CO%2Fimage.png?alt=media&#x26;token=445394df-e739-48cd-942f-28e6954b506f" alt=""><figcaption></figcaption></figure>

9. After the deployments have been confirmed, you may view and manage your newly deployed AVS.
