|
| 1 | +# Eigenlayer CLI Commands |
| 2 | + |
| 3 | +Our CLI provides commands for deploying and running Eigenlayer AVSs. We have two templates for quickly creating an AVS: the [BLS template](/developers/eigenlayer-avs/bls-template) and the [ECDSA template](/developers/eigenlayer-avs/ecdsa-template). |
| 4 | + |
| 5 | +For a step-by-step example of using the BLS template, see [Deploying an Eigenlayer AVS](/developers/eigenlayer-avs/bls-example). |
| 6 | + |
| 7 | +## Blueprint Commands |
| 8 | + |
| 9 | +The blueprint commands allow you to create, deploy, and run Eigenlayer AVS services. |
| 10 | + |
| 11 | +### Create a New AVS Project |
| 12 | + |
| 13 | +```bash |
| 14 | +cargo tangle blueprint create -n <NAME> --eigenlayer [BLS|ECDSA] |
| 15 | +``` |
| 16 | + |
| 17 | +#### Create Options |
| 18 | + |
| 19 | +- `-n, --name <NAME>`: Name of your AVS project |
| 20 | +- `--eigenlayer`: Specify either BLS or ECDSA variant |
| 21 | + |
| 22 | +### Deploy AVS Contracts |
| 23 | + |
| 24 | +```bash |
| 25 | +cargo tangle blueprint deploy eigenlayer [OPTIONS] |
| 26 | +``` |
| 27 | + |
| 28 | +#### Deploy Options |
| 29 | + |
| 30 | +- `--rpc-url <URL>`: HTTP RPC endpoint to connect to (required unless --devnet is used) |
| 31 | +- `--contracts-path <PATH>`: Path to your contracts directory (defaults to "./contracts") |
| 32 | +- `--ordered-deployment`: Deploy contracts in an interactive ordered manner (if omitted, deploys as they are found) |
| 33 | +- `-w, --network <NETWORK>`: Network to deploy to (local, testnet, mainnet) [default: local] |
| 34 | +- `--devnet`: Start a local devnet using Anvil (only valid with --network local) |
| 35 | +- `-k, --keystore-path <PATH>`: Path to your keystore (defaults to ./keystore) |
| 36 | + |
| 37 | +### Run AVS Service |
| 38 | + |
| 39 | +```bash |
| 40 | +cargo tangle blueprint run [OPTIONS] |
| 41 | +``` |
| 42 | + |
| 43 | +#### Run Options |
| 44 | + |
| 45 | +- `-p, --protocol eigenlayer`: Specify Eigenlayer protocol |
| 46 | +- `-u, --rpc-url <URL>`: HTTP RPC endpoint URL (required) |
| 47 | +- `-k, --keystore-path <PATH>`: Path to the keystore (defaults to ./keystore) |
| 48 | +- `-b, --binary-path <PATH>`: Path to the AVS binary (optional, will build if not provided) |
| 49 | +- `-w, --network <NETWORK>`: Network to connect to (local, testnet, mainnet) |
| 50 | +- `-d, --data-dir <PATH>`: Data directory path (defaults to ./data) |
| 51 | +- `-n, --bootnodes <NODES>`: Optional bootnodes to connect to |
| 52 | +- `-f, --settings-file <PATH>`: Path to the protocol settings env file (defaults to ./settings.env) |
| 53 | + |
| 54 | +### Required Environment Variables for Eigenlayer |
| 55 | + |
| 56 | +The following environment variables must be set in your settings.env file: |
| 57 | + |
| 58 | +- `REGISTRY_COORDINATOR_ADDRESS`: Address of the Registry Coordinator contract |
| 59 | +- `OPERATOR_STATE_RETRIEVER_ADDRESS`: Address of the Operator State Retriever contract |
| 60 | +- `DELEGATION_MANAGER_ADDRESS`: Address of the Delegation Manager contract |
| 61 | +- `SERVICE_MANAGER_ADDRESS`: Address of the Service Manager contract |
| 62 | +- `STAKE_REGISTRY_ADDRESS`: Address of the Stake Registry contract |
| 63 | +- `STRATEGY_MANAGER_ADDRESS`: Address of the Strategy Manager contract |
| 64 | +- `AVS_DIRECTORY_ADDRESS`: Address of the AVS Directory contract |
| 65 | +- `REWARDS_COORDINATOR_ADDRESS`: Address of the Rewards Coordinator contract |
| 66 | + |
| 67 | +## Example Workflow |
| 68 | + |
| 69 | +1. **Create a New AVS Project** |
| 70 | + |
| 71 | + ```bash |
| 72 | + cargo tangle blueprint create -n my-avs --eigenlayer bls |
| 73 | + ``` |
| 74 | + |
| 75 | +2. **Build Your AVS** |
| 76 | + |
| 77 | + ```bash |
| 78 | + cargo build --release |
| 79 | + ``` |
| 80 | + |
| 81 | +3. **Deploy Contracts** |
| 82 | + |
| 83 | + ```bash |
| 84 | + # Deploy to local devnet |
| 85 | + cargo tangle blueprint deploy eigenlayer \ |
| 86 | + --devnet \ |
| 87 | + --ordered-deployment |
| 88 | + |
| 89 | + # Or deploy to testnet |
| 90 | + cargo tangle blueprint deploy eigenlayer \ |
| 91 | + --network testnet \ |
| 92 | + --rpc-url <YOUR_RPC_URL> \ |
| 93 | + --ordered-deployment |
| 94 | + ``` |
| 95 | + |
| 96 | +4. **Run Your Service** |
| 97 | + ```bash |
| 98 | + cargo tangle blueprint run \ |
| 99 | + -p eigenlayer \ |
| 100 | + -u <YOUR_RPC_URL> |
| 101 | + ``` |
| 102 | + |
| 103 | +## Troubleshooting |
| 104 | + |
| 105 | +Common issues and solutions: |
| 106 | + |
| 107 | +1. **Deployment Failures** |
| 108 | + |
| 109 | + - Verify RPC endpoint is accessible |
| 110 | + - Ensure correct network is specified (local, testnet, mainnet) |
| 111 | + - Check contract constructor arguments |
| 112 | + - Verify sufficient funds for deployment |
| 113 | + |
| 114 | +2. **Service Issues** |
| 115 | + - Check settings.env file contains all required contract addresses |
| 116 | + - Verify contract addresses are correct for the chosen network |
| 117 | + - Ensure binary is built with correct features |
| 118 | + - Check network connectivity and RPC endpoint accessibility |
0 commit comments