Eigenlayer CLI Commands
Our CLI provides commands for deploying and running Eigenlayer AVSs. We have two templates for quickly creating an AVS: the BLS template and the ECDSA template.
For a step-by-step example of using the BLS template, see Deploying an Eigenlayer AVS.
Blueprint Commands
The blueprint commands allow you to create, deploy, and run Eigenlayer AVS services.
Create a New AVS Project
cargo tangle blueprint create -n <NAME> --eigenlayer [BLS|ECDSA]
Create Options
-n, --name <NAME>
: Name of your AVS project--eigenlayer
: Specify either BLS or ECDSA variant
Deploy AVS Contracts
cargo tangle blueprint deploy eigenlayer [OPTIONS]
Deploy Options
--rpc-url <URL>
: HTTP RPC endpoint to connect to (required unless --devnet is used)--contracts-path <PATH>
: Path to your contracts directory (defaults to "./contracts")--ordered-deployment
: Deploy contracts in an interactive ordered manner (if omitted, deploys as they are found)-w, --network <NETWORK>
: Network to deploy to (local, testnet, mainnet) [default: local]--devnet
: Start a local devnet using Anvil (only valid with --network local)-k, --keystore-path <PATH>
: Path to your keystore (defaults to ./keystore)
Run AVS Service
cargo tangle blueprint run [OPTIONS]
Run Options
-p, --protocol eigenlayer
: Specify Eigenlayer protocol-u, --rpc-url <URL>
: HTTP RPC endpoint URL (required)-k, --keystore-path <PATH>
: Path to the keystore (defaults to ./keystore)-b, --binary-path <PATH>
: Path to the AVS binary (optional, will build if not provided)-w, --network <NETWORK>
: Network to connect to (local, testnet, mainnet)-d, --data-dir <PATH>
: Data directory path (defaults to ./data)-n, --bootnodes <NODES>
: Optional bootnodes to connect to-f, --settings-file <PATH>
: Path to the protocol settings env file (defaults to ./settings.env)
Required Environment Variables for Eigenlayer
The following environment variables must be set in your settings.env file:
REGISTRY_COORDINATOR_ADDRESS
: Address of the Registry Coordinator contractOPERATOR_STATE_RETRIEVER_ADDRESS
: Address of the Operator State Retriever contractDELEGATION_MANAGER_ADDRESS
: Address of the Delegation Manager contractSERVICE_MANAGER_ADDRESS
: Address of the Service Manager contractSTAKE_REGISTRY_ADDRESS
: Address of the Stake Registry contractSTRATEGY_MANAGER_ADDRESS
: Address of the Strategy Manager contractAVS_DIRECTORY_ADDRESS
: Address of the AVS Directory contractREWARDS_COORDINATOR_ADDRESS
: Address of the Rewards Coordinator contract
Example Workflow
-
Create a New AVS Project
cargo tangle blueprint create -n my-avs --eigenlayer bls
-
Build Your AVS
cargo build --release
-
Deploy Contracts
# Deploy to local devnet cargo tangle blueprint deploy eigenlayer \ --devnet \ --ordered-deployment # Or deploy to testnet cargo tangle blueprint deploy eigenlayer \ --network testnet \ --rpc-url <YOUR_RPC_URL> \ --ordered-deployment
-
Run Your Service
cargo tangle blueprint run \ -p eigenlayer \ -u <YOUR_RPC_URL>
Troubleshooting
Common issues and solutions:
-
Deployment Failures
- Verify RPC endpoint is accessible
- Ensure correct network is specified (local, testnet, mainnet)
- Check contract constructor arguments
- Verify sufficient funds for deployment
-
Service Issues
- Check settings.env file contains all required contract addresses
- Verify contract addresses are correct for the chosen network
- Ensure binary is built with correct features
- Check network connectivity and RPC endpoint accessibility