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
Othentic does not run the network or operators; the CLI helps you build your own AVS.
This guide references the and demonstrates how to deploy and run it on (L2) and (L1).
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: Fund this account to cover gas costs for contract deployments and cross-chain messages.
At least 1.5 holETH
on Holešky (L1) ()
At least 5 POL
on Amoy (L2) ()
Operator account x 3: Create three internal Operator addresses for registration in the subsequent steps. You can use this to create and fund these accounts. These funds are used to cover gas fees for operator registration on L1.
For the demo AVS, operator1
will act as the , while operator2
and operator3
will act as Attesters.
At least 0.02 holETH
on Holešky per account.
Ensure operator1
is funded with POL
on Amoy to submit tasks on the L2.
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:
Run the following command to deploy AVS contracts:
For detailed information on contract deployment and the available arguments, refer to the section.
Make sure --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 contracts will be displayed.
Output example:
To configure your environment, update the .env
file with the following deployed contract addresses and private keys. Retrieve the contract addresses by running:
Add contract addresses:
For the demo AVS, you can use the operator1
private key as the values for the Performer and Aggregator private keys (as created in step 2):
Add the Deployer private key (as created in Step 2):
Add the chain Ids. It is recommended to set these variables in the .env
file to avoid specifying --l1-chain
in every command.
Set the L1_RPC
and L2_RPC
environment variables using private, reliable RPC endpoints.
Pre-configured
Pinata Configuration for IPFS: Used by the to store the
Bootstrap Node Configuration: Used to connect peers on the network
Setup operator
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 three operators listed in your .env
file:
Enter operator
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 the three internal Operators.
To register as an operator on your AVS, run the following command 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. Output example:
If you've deployed on chains other than Amoy or Holešky, 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: 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 contract.
: Provides task execution functionality for the AVS.
Provides task validation 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)