Skip to content

feat: add avs-devnet configuration file #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions devnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# yaml-language-server: $schema=https://github.com/Layr-Labs/avs-devnet/raw/refs/heads/main/schema.json

# Local devnet config file for the hello-world-avs example
# This file can be used inside the hello-world-avs repo to start
# a devnet with any local changes

# To run this example:
# 0. Ensure you have the latest version of the devnet (see https://github.com/Layr-Labs/avs-devnet for how to install)
# 1. While inside the Hello World repo, run `avs-devnet start`

deployments:
- name: EigenLayer
repo: "."
contracts_path: "contracts"
script: script/DeployEigenLayerCore.s.sol
env:
# NOTE: this is used inside the deployer script
PRIVATE_KEY: "{{.deployer_private_key}}"
# NOTE: these are needed because of repo's `foundry.toml`
HOLESKY_PRIVATE_KEY: ""
HOLESKY_RPC_URL: ""
ETHERSCAN_API_KEY: ""
input:
config/core/: core_deployment_config
output:
eigenlayer_addresses: "deployments/core/31337.json"

- name: hello-world-avs
repo: "."
contracts_path: "contracts"
script: script/HelloWorldDeployer.s.sol
env:
# NOTE: this is used inside the deployer script
PRIVATE_KEY: "{{.deployer_private_key}}"
# NOTE: these are needed because of repo's `foundry.toml`
HOLESKY_PRIVATE_KEY: ""
HOLESKY_RPC_URL: ""
ETHERSCAN_API_KEY: ""
input:
config/hello-world/: avs_deployment_config
deployments/core/: eigenlayer_addresses
output:
avs_addresses: "deployments/hello-world/31337.json"

services:
- name: operator
image: hello_world
build_context: "."
input:
/app/contracts/deployments/core/: eigenlayer_addresses
/app/contracts/deployments/hello-world/: avs_addresses
env:
# This expands to the RPC node's URL
RPC_URL: "{{.http_rpc_url}}"
PRIVATE_KEY: "{{.keys.operator_ecdsa_keys.private_key}}"
cmd: ["npm", "run", "start:operator"]

- name: traffic-generator
image: hello_world
build_context: "."
input:
/app/contracts/deployments/core/: eigenlayer_addresses
/app/contracts/deployments/hello-world/: avs_addresses
env:
# This expands to the RPC node's URL
RPC_URL: "{{.http_rpc_url}}"
PRIVATE_KEY: "{{.keys.traffic_generator_ecdsa_keys.private_key}}"
cmd: ["npm", "run", "start:traffic"]

keys:
- name: operator_ecdsa_keys
type: ecdsa
- name: traffic_generator_ecdsa_keys
type: ecdsa

artifacts:
core_deployment_config:
files:
31337.json:
template: |
{
"strategyManager": {
"initPausedStatus": 0,
"initialOwner": "{{.deployer_address}}",
"initialStrategyWhitelister": "0x0000000000000000000000000000000000000000"
},
"delegationManager": {
"initPausedStatus": 0,
"initialOwner": "{{.deployer_address}}",
"minWithdrawalDelayBlocks": 50400
},
"eigenPodManager": {
"initPausedStatus": 0,
"initialOwner": "{{.deployer_address}}"
},
"allocationManager": {
"initPausedStatus": 0,
"initialOwner": "{{.deployer_address}}",
"deallocationDelay": 0,
"allocationConfigurationDelay": 0
},
"strategyFactory": {
"initPausedStatus": 0,
"initialOwner": "{{.deployer_address}}"
},
"avsDirectory": {
"initPausedStatus": 0,
"initialOwner": "{{.deployer_address}}"
},
"rewardsCoordinator": {
"initPausedStatus": 0,
"initialOwner": "{{.deployer_address}}",
"rewardsUpdater": "{{.deployer_address}}",
"activationDelay": 0,
"defaultSplitBips": 1000,
"calculationIntervalSeconds": 86400,
"maxRewardsDuration": 864000,
"maxRetroactiveLength": 86400,
"maxFutureLength": 86400,
"genesisRewardsTimestamp": 1672531200
}
}

avs_deployment_config:
files:
31337.json:
template: |
{
"addresses": {
"rewardsOwner": "{{.deployer_address}}",
"rewardsInitiator": "{{.deployer_address}}"
},
"keys": {
"rewardsOwner": "{{.deployer_private_key}}",
"rewardsInitiator": "{{.deployer_private_key}}"
}
}

ethereum_package:
additional_services:
- blockscout
network_params:
# We use the chain ID hardcoded in the hello-world-avs example
network_id: "31337"
seconds_per_slot: 3
Loading