Quick Start
Instructions for installing the Othentic CLI and deploy an AVS.
Last updated
Instructions for installing the Othentic CLI and deploy an AVS.
Last updated
This guide references the and demonstrates how to deploy and run it on (L2) and (L1) chains.
You can deploy the AVS on any network listed in , and on simultaneously.
For other language implementations, refer to:
Go:
Rust:
Node v22.6.0 ⚠️ (must be exactly v22.6.0; using any other version will cause compatibility issues) and NPM,
Docker and docker-compose (see for instructions based on your OS)
At least 1.56 holETH
on Holešky Testnet ()
At least 6 POL
on Polygon Amoy Testnet ()
For the purposes of the demo AVS, you'll need the following accounts:
Deployer account: These funds cover the gas costs for contract deployment on both L1 and L2, as well as for funding message handlers to process cross-chain messages.
Ensure this account has at least 1.5 holETH
on Holešky (L1) ()
Ensure this account has at least 5 POL
on Amoy (L2) ()
Operator account x 3: Register 3 self-deploy Operator addresses for operator registration in the subsequent steps. You can also use this to create and fund these accounts. These funds are used to cover gas fees for operator registration on L1.
Ensure each account has at least 0.02 holETH
on Holešky.
For the demo AVS, operator1
will act as the Performer, Attester, and Aggregator, while operator2
and operator3
will act as Attesters.
Since the Aggregator needs funds on L2 to submit tasks on-chain, ensure operator1
is funded on Amoy.
ERC-20 token address: the address of the token backing the AVS. For this guide, we'll use .
Configure the deployer account’s private key in the .env
file:
Make sure the Deployer account has at least ~1.5 holETH
To deploy the AVS’s contracts, run the following command:
By default, Othentic CLI deploys your contracts on and testnets. To deploy on other chains, you shall specify the appropriate environment variables.
If you are planning to deploy on multiple L2 chains, refer to the section for setup and configuration details.
The rewards token is the token used to distribute rewards to Operators. It can be either ETH or any ERC-20 token address. For detailed information on contract deployment and the available arguments, refer to the section.
Make sure the AVS name specified with --name
is unique for each deployer address.
When prompted, enter the Deployer account's private key to proceed with the deployment:
Once the private key is entered, the deployment will proceed, and transaction hashes for both L1 and L2 will be displayed. It deploys the necessary contracts on L1 (AvsTreasury, AvsGovernance, L1MessageHandler) and L2 (AttestationCenter, L2MessageHandler, OBLS, InternalTaskHandler) to run the AVS.
This is how the output will look:
To configure your environment, update the .env
file with the following deployed contract addresses and private keys. Retrieve the contract addresses by running:
Required Configuration:
Governance and Attestation Contract Addresses Add the contract addresses for governance and attestation center.
Private Keys for Performer, Aggregator and Attester Operators For the demo AVS, you can use the first operator's private key as the values for the performer and aggregator private keys. (As created in step 2)
Deployer Private Key Add the deployer private key as created in Step 2:
L1_CHAIN and L2_CHAIN
Add the chain Ids. It is recommended to set these variable in the .env
file to avoid specifying --l1-chain
in every command.
L1_RPC and L2_RPC
Set the L1_RPC
and L2_RPC
environment variables using private, reliable RPC endpoints.
Pre-configured
Pinata Configuration for IPFS: Used by the execution service to store the proof of task
Bootstrap Node Configuration: Used to connect peers on the network
To Register as an operator on EigenLayer, run the following command three times, once for each operator:
Follow these steps when prompted,
Enter the Operator's private key.
Enter the Operator Details
Operator name
Description
Website
Logo url
Twitter profile
At the end, the CLI will display the transaction hash.
In order to run the AVS Operators, it is required to setup their corresponding Ethereum accounts with the necessary metadata and stake on EigenLayer.
To deposit (restake) 0.01 stETH into the EigenLayer stETH staking contract, run the following command for all the three operators listed in your .env
file:
Enter operator's private key, select the stEth staking contract and enter the amount 0.012
If you don't have stETH
, the command will automatically convert holETH
into stETH
before depositing.
✅ Your internal Operators are now ready to opt-in to your AVS.
For this demo, you’ll need to register 3 internal Operators.
To Register as an operator for AVS, run the following command three times, once for each operator:
When prompted, enter the Operator's private key. Note: In production, it is recommended to use separate keys for security purposes, as outlined in the section.
Next, enter the governance contract address
Lastly, the Rewards Receiver address: Ideally, the rewards receiver address should be a smart contract that distributes rewards to all the stakers. You can leave this field empty to pass the Operator address by default.
Upon successful registration, the terminal will display the transaction hash on L2. This is how the output will look:
If you've deployed on chains other than amoy or holesky, make sure to update the --l1-chain
and --l2-chain
values in the docker-compose.yml
file accordingly.
To run the demo AVS, navigate to the simple-price-oracle-avs-example
directory and execute the following command:
This command will build and start the AVS network, which consists of multiple services defined in the docker-compose.yml
file. The services set up are as follows:
3 nodes: These nodes are responsible for validating and attesting task execution.
node: Subscribes to attestation
events from Attesters, aggregates their signatures, and submits an on chain transaction to the AttestationCenter contract.
Provides task validation functionality for the AVS.
: Provides task execution functionality for the AVS.
If you wish to rebuild existing images, update the Othentic CLI inside the docker images:
✅ Your demo AVS is completed.
Upon successful execution, a transaction hash will be displayed in the logs, representing an on-chain transaction on the AttestationCenter contract.
If you don't have existing accounts to use as Operators, you can run this script to create and fund accounts on Holešky:
You can run the script by using sh <script-path>
, or make it executable with chmod a+x <script-path>
and then execute it with ./<script-path>
.
If you've deployed your contracts on chains other than the defaults, make sure to set the corresponding environment variables.
Explore the repository. Modify the various configurations, tailor the task execution logic to your use case, and run the AVS with your updates.
Create detailed based on your use case.
Find all the CLI commands in the page.
Prerequisites: Foundry (see for instructions)