Deploy AVS

The Othentic CLI allows you to deploy AVS contracts on any supported network.

Read More

Prerequisites

  1. Deployer account with sufficient gas funds on all networks

  2. Network names you want to deploy to (Supported chains)

  3. (Optional) Rewards token address

  4. (Optional) AVS governance multisig owner address

--avs-governance-multisig-owner Defines the address of the AVS Governance Multisig role. If not specified, the deployer address is set as the default owner.

Deployment Options

These options refer only to the deployment step; all configurations can be changed later. You can choose from one of the following deployment options:


1. Deploy with ERC20 rewards token

Deploy AVS contracts to L1 and a single L2 chain where operators are rewarded in a specified ERC20 token.

  • In this option, rewards are paid on L1.

  • Replace <ERC20_REWARDS_TOKEN_L1_ADDRESS> with the ERC20 token contract address (on L1)

otcli network deploy \
  --l1-chain holesky \
  --l2-chain base-sepolia \
  --rewards-token <ERC20_REWARDS_TOKEN_L1_ADDRESS> \
  --l1-initial-deposit 10000000000000000 \
  --l2-initial-deposit 10000000000000000 \
  --name test-avs-name

2. Deploy an AVS on multiple L2s

Deploy the AVS contracts to multiple L2 chains, each managing its own rewards and seamlessly communicating with shared security on L1.

Separate each L2 by commas in --l2-chain.

otcli network deploy \
  --l1-chain holesky \
  --l2-chain base-sepolia,amoy,arbitrum-one-sepolia \
  --rewards-token eth \
  --l1-initial-deposit 10000000000000000 \
  --l2-initial-deposit 10000000000000000 \
  --name multi-l2-avs

3. Deploy an AVS with rewards on L2

Specifying the --l2-rewards flag enables reward distribution to operators on L2 instead of L1. If not specified, rewards will be distributed on L1 by default.

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

4. Deploy all AVS contracts on L1

Deploy both L1 and L2 contracts on the same L1 chain.

otcli network deploy \
    --l1-chain holesky \
    --l2-chain holesky-l2 \
    --rewards-token eth \
    --l1-initial-deposit 10000000000000000 \
    --l2-initial-deposit 10000000000000000 \
    --name l1-avs

5. Deploy an AVS with a specified owner address

Deploy the AVS contracts and specify a specific address to serve as the owner or the AVS. This address can be an EOA or Contract, for example a Safe Smart Account or Multisig account.

otcli network deploy \
  --l1-chain holesky \
  --l2-chain base-sepolia \
  --rewards-token eth \
  --l1-initial-deposit 10000000000000000 \
  --l2-initial-deposit 10000000000000000 \
  --name multisig-owner-avs \
  --avs-governance-multisig-owner <OWNER_ADDRESS> \
  --browser-sign

6. Deploy with native ETH as rewards token

Deploy AVS contracts to L1 and a single L2 chain where operators are rewarded in ETH.

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

7. Deploy an AVS with browser wallet

This guide will walk you through how to execute CLI operations using a browser wallet.

1

Run your CLI command with the --browser-sign flag

otcli network deploy \
    --l1-chain sepolia \
    --l2-chain base-sepolia \
    --rewards-token eth \
    --l1-initial-deposit 100000000000000000 \
    --l2-initial-deposit 100000000000000000 \
    --name test-avs-name-123 \
    --browser-sign 
2

Connect Your wallet

If your wallet is not already connected, a browser prompt will appear asking you to connect.

3

Select your wallet provider

A browser prompt will open. Select your MetaMask wallet

4

Connect to your desired wallet

Connect to the account you want to use for signing.

5

Sign the transaction

MetaMask will prompt you to sign the transaction. Review and approve it.

Sign Transaction

6

View transaction hash

Once the transaction is signed, the transaction hash will be displayed in the browser.

sign transaction

View Deployed Addresses

After deployment, view AVS contract addresses by running:

cat .othentic/state.output.json

Last updated