This guide will walk you through the deployment of the Aligned Layer contracts.
Also, you will be able to deploy the Batcher Payment Service contract.
-
You need to have installed
gitandmake. -
Clone the repository
git clone https://github.com/yetanotherco/aligned_layer.git
-
Install foundry
make install_foundry foundryup -v nightly-a428ba6ad8856611339a6319290aade3347d25d9
-
You should have a keystore for the Aggregator, with the seedphrase saved on paper
-
If you don't have an API Key on Etherscan, create one following this guide.
-
If you don't have it, create a wallet to deploy Aligned with
cast wallet new. and keep theAddressandPrivate Keyvalues -
Transfer around 35M gas to the
Address -
CDinto the Aligned repo -
Set the
PRIVATE_KEYandETHERSCAN_API_KEYon the.envused to deploy.contracts/scripts/.env.mainnetorcontracts/scripts/.env.holeskyorcontracts/scripts/.env.sepolia -
Set
aggregatorvalue ofcontracts/script/deploy/config/mainnet/aligned.mainnet.config.jsonorcontracts/script/deploy/config/holesky/aligned.holesky.config.jsonorcontracts/script/deploy/config/sepolia/aligned.sepolia.config.jsonto the address from step 1. -
Set
deployervalue ofcontracts/script/deploy/config/mainnet/aligned.mainnet.config.jsonorcontracts/script/deploy/config/holesky/aligned.holesky.config.jsonorcontracts/script/deploy/config/sepolia/aligned.sepolia.config.jsonto the address from step 3. -
Set
owner,upgrader,churner,ejectorandpauservalues ofcontracts/script/deploy/config/mainnet/aligned.mainnet.config.jsonorcontracts/script/deploy/config/holesky/aligned.holesky.config.jsonorcontracts/script/deploy/config/sepolia/aligned.sepolia.config.jsonto the multisig controlling this processes, or the owner of the deploying address, depending on what you want. -
Deploy the contracts with the following command:
For Mainnet deployment:
make deploy_aligned_contracts NETWORK=mainnet
For Holesky deployment:
make deploy_aligned_contracts NETWORK=holesky
For Sepolia deployment:
make deploy_aligned_contracts NETWORK=sepolia
If the deployment is correct, you will find the deployment information here:
- Mainnet:
contracts/script/output/mainnet/alignedlayer_deployment_output.json - Holesky:
contracts/script/output/holesky/alignedlayer_deployment_output.json - Sepolia:
contracts/script/output/sepolia/alignedlayer_deployment_output.json
- Mainnet:
-
Upgrade the new contracts addresses in docs/3_guides/7_contract_addresses.md
-
Create a PR with the new contract addresses and the updated docs.
-
You should have a keystore for the Batcher, with the Seedphrase saved on paper.
-
If you don't have an API Key on Etherscan, create one following this guide.
-
If you don't have it, create a wallet to deploy BatcherPaymentsService with
cast wallet new. and keep theAddressandPrivate Keyvalues -
Transfer around 2.5M gas to the
Address -
Set the
PRIVATE_KEYandETHERSCAN_API_KEYon the.envused to deploy.contracts/scripts/.env.mainnetorcontracts/scripts/.env.holeskyorcontracts/scripts/.env.sepolia -
Set
ownervalue ofcontracts/script/deploy/config/mainnet/batcher-payment-service.mainnet.config.jsonorcontracts/script/deploy/config/holesky/batcher-payment-service.holesky.config.jsonorcontracts/script/deploy/config/sepolia/batcher-payment-service.sepolia.config.jsonto the multisig controlling this contract, or the owner of the deploying address, depending on what you want. -
Set
batcherWalletvalue ofcontracts/script/deploy/config/mainnet/batcher-payment-service.mainnet.config.jsonorcontracts/script/deploy/config/holesky/batcher-payment-service.holesky.config.jsonorcontracts/script/deploy/config/sepolia/batcher-payment-service.sepolia.config.jsonto the address from step 1. -
Set
alignedLayerServiceManagervalue ofcontracts/script/deploy/config/mainnet/batcher-payment-service.mainnet.config.jsonorcontracts/script/deploy/config/holesky/batcher-payment-service.holesky.config.jsonorcontracts/script/deploy/config/sepolia/batcher-payment-service.sepolia.config.jsonto the address of the AlignedServiceManager contract deployed on AlignedServiceManager Contracts. -
Deploy the contracts with the following command:
For Mainnet deployment:
make deploy_batcher_payment_service NETWORK=mainnet
For Holesky deployment:
make deploy_batcher_payment_service NETWORK=holesky
For Sepolia deployment:
make deploy_batcher_payment_service NETWORK=sepolia
If the deployment is correct, you will find the deployment information here:
- Mainnet:
contracts/script/output/mainnet/alignedlayer_deployment_output.json - Holesky:
contracts/script/output/holesky/alignedlayer_deployment_output.json - Sepolia:
contracts/script/output/sepolia/alignedlayer_deployment_output.json
- Mainnet:
-
Upgrade the new contracts addresses in docs/3_guides/7_contract_addresses.md
-
Create a PR with the new contract addresses and the updated docs.