Skip to content

Commit 0893e0b

Browse files
committed
docs: better instructions
1 parent d0c9cea commit 0893e0b

File tree

5 files changed

+60
-26
lines changed

5 files changed

+60
-26
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,19 @@ deploy_aligned_contracts: ## Deploy Aligned Contracts
568568
@echo "Deploying Aligned Contracts..."
569569
@. contracts/scripts/.env && . contracts/scripts/deploy_aligned_contracts.sh
570570

571+
deploy_mainnet_aligned_contracts: ## Deploy Aligned Contracts on Mainnet
572+
@echo "Deploying Aligned Contracts on Mainnet..."
573+
@. contracts/scripts/.env.mainnet && . contracts/scripts/deploy_aligned_contracts_mainnet.sh
574+
575+
deploy_holesky_aligned_contracts: ## Deploy Aligned Contracts on Holesky
576+
@echo "Deploying Aligned Contracts on Holesky..."
577+
@. contracts/scripts/.env.holesky && . contracts/scripts/deploy_aligned_contracts_holesky.sh
578+
579+
deploy_sepolia_aligned_contracts: ## Deploy Aligned Contracts on Sepolia
580+
@echo "Deploying Aligned Contracts on Sepolia..."
581+
@. contracts/scripts/.env.speolia && . contracts/scripts/deploy_aligned_contracts_sepolia.sh
582+
583+
571584
deploy_pauser_registry: ## Deploy Pauser Registry
572585
@echo "Deploying Pauser Registry..."
573586
@. contracts/scripts/.env && . contracts/scripts/deploy_pauser_registry.sh

contracts/scripts/.env.holesky

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
2+
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
3+
EXISTING_DEPLOYMENT_INFO_PATH=./script/output/holesky/eigenlayer_deployment_output.json
4+
DEPLOY_CONFIG_PATH=./script/deploy/config/holesky/aligned.holesky.config.json
5+
BATCHER_PAYMENT_SERVICE_CONFIG_PATH=./script/deploy/config/holesky/batcher-payment-service.holesky.config.json
6+
OUTPUT_PATH=./script/output/holesky/alignedlayer_deployment_output.json
7+
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_API_KEY>
8+
MULTISIG=false

contracts/scripts/.env.mainnet

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
RPC_URL=https://ethereum-rpc.publicnode.com
2+
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
3+
EXISTING_DEPLOYMENT_INFO_PATH=./script/output/mainnet/eigenlayer_deployment_output.json
4+
DEPLOY_CONFIG_PATH=./script/deploy/config/mainnet/aligned.mainnet.config.json
5+
BATCHER_PAYMENT_SERVICE_CONFIG_PATH=./script/deploy/config/mainnet/batcher-payment-service.mainnet.config.json
6+
OUTPUT_PATH=./script/output/mainnet/alignedlayer_deployment_output.json
7+
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_API_KEY>
8+
MULTISIG=false

contracts/scripts/.env.sepolia

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
2+
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
3+
EXISTING_DEPLOYMENT_INFO_PATH=./script/output/sepolia/eigenlayer_deployment_output.json
4+
DEPLOY_CONFIG_PATH=./script/deploy/config/sepolia/aligned.sepolia.config.json
5+
BATCHER_PAYMENT_SERVICE_CONFIG_PATH=./script/deploy/config/sepolia/batcher-payment-service.sepolia.config.json
6+
OUTPUT_PATH=./script/output/sepolia/alignedlayer_deployment_output.json
7+
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_API_KEY>
8+
MULTISIG=false

docs/0_internal/2_deploy_contracts.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,26 @@ Also, you will be able to deploy the Batcher Payment Service contract.
1818
make install_foundry
1919
foundryup -v nightly-a428ba6ad8856611339a6319290aade3347d25d9
2020
```
21+
22+
- Get an API KEY from Etherescan to verify the contracts. You can follow this [guide](https://docs.etherscan.io/getting-started/viewing-api-usage-statistics).
2123

22-
## Eigenlayer Contracts
24+
- You need a hot wallet with some ETH to deploy the contracts. The deployment cost is approximately 30M gas units.
2325

24-
To deploy Aligned contracts, you need previously deployed EigenLayer contracts.
25-
26-
These contracts are not deployed by Aligned. These are the current EigenLayer contracts:
27-
28-
- [Holesky Contracts](https://github.com/Layr-Labs/eigenlayer-contracts/blob/testnet-holesky/script/configs/holesky/eigenlayer_addresses_testnet.config.json)
29-
- [Mainnet Contracts](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/script/configs/mainnet/mainnet-addresses.config.json)
30-
- Aligned has his own Eigenlayer contracts deployed in Sepolia for testing. You can find them in [Sepolia Contracts](../../contracts/script/output/sepolia/eigenlayer_deployment_output.json).
31-
32-
## Aligned Contracts
26+
## AlignedServiceManager Contracts
3327

3428
This section will guide you through the deployment of the Aligned Layer contracts.
3529

3630
After finishing the deployment, you will have the deployed contract addresses.
3731

3832
### Set .env variables
3933

40-
To deploy the AlignedLayer contracts, you will need to set environment variables in a `.env` file in the same
41-
directory as the deployment script (`contracts/scripts/`).
42-
43-
The necessary environment variables are:
34+
To deploy the contracts, you need to set the `PRIVATE_KEY` and `ETHERSCAN_API_KEY` variables in the `.env` file.
4435

45-
| Variable Name | Description | Sepolia | Holesky | Mainnet |
46-
|---------------------------------|-----------------------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------|-------------------------------------|
47-
| `RPC_URL` | The RPC URL of the network you want to deploy to. | https://ethereum-sepolia-rpc.publicnode.com | https://ethereum-holesky-rpc.publicnode.com | https://ethereum-rpc.publicnode.com |
48-
| `PRIVATE_KEY` | The private key of the account you want to deploy the contracts with. | <your_private_key> | <your_private_key> | <your_private_key> |
49-
| `EXISTING_DEPLOYMENT_INFO_PATH` | The path to the file containing the deployment info about EigenLayer. | ./script/output/sepolia/eigenlayer_deployment_output.json | ./script/output/holesky/eigenlayer_deployment_output.json | TBD |
50-
| `DEPLOY_CONFIG_PATH` | The path to the deployment config file for the Service Manager. | ./script/deploy/config/sepolia/aligned.sepolia.config.json | ./script/deploy/config/holesky/aligned.holesky.config.json | TBD |
51-
| `OUTPUT_PATH` | The path to the file where the deployment info will be saved. | ./script/output/sepolia/alignedlayer_deployment_output.json | ./script/output/holesky/alignedlayer_deployment_output.json | TBD |
52-
| `ETHERSCAN_API_KEY` | API KEY to verify the contracts in Etherscan. | <your_etherscan_api_key> | <your_etherscan_api_key> | <your_etherscan_api_key> |
36+
For **Mainnet** deployment, the `env` file is available [here](../../contracts/scripts/.env.mainnet).
5337

54-
You can find an example `.env` file in [.env.example.holesky](../../contracts/scripts/.env.example.holesky)
38+
For **Holesky** deployment, the `env` file is available [here](../../contracts/scripts/.env.holesky).
5539

56-
> [!WARNING]
57-
> All file paths must be inside the `script/` directory, as shown in `.env.example.holesky` because of `foundry`'s permissions to read and write files.
40+
For **Sepolia** deployment, the `env` file is available [here](../../contracts/scripts/.env.sepolia).
5841

5942
### Set DEPLOY_CONFIG_PATH file
6043

@@ -99,8 +82,22 @@ For example, if you are using a Multisig for the `upgrader` permission, you need
9982

10083
Once you have configured the `.env` and `DEPLOY_CONFIG_PATH` files, you can run the following command:
10184

85+
For **Mainnet** deployment:
86+
87+
```bash
88+
make deploy_mainnet_aligned_contracts
89+
```
90+
91+
For **Holesky** deployment:
92+
93+
```bash
94+
make deploy_holesky_aligned_contracts
95+
```
96+
97+
For **Sepolia** deployment:
98+
10299
```bash
103-
make deploy_aligned_contracts
100+
make deploy_sepolia_aligned_contracts
104101
```
105102

106103
Once the contracts are deployed, you will see the following output at `OUTPUT_PATH` file:

0 commit comments

Comments
 (0)