Skip to content

Commit

Permalink
feat: holesky network minimal support (no tests, config is partial)
Browse files Browse the repository at this point in the history
  • Loading branch information
arwer13 committed Nov 21, 2023
1 parent 50dc54d commit 921471c
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,30 @@ poetry shell
### Network setup

By default, you should start composing new scripts and test using forked networks.
You have two forked networks to work with:
You have three forked networks to work with:

- `mainnet-fork`
- `goerli-fork`
- `holesky-fork`

To start new voting on the live networks you could proceed with:

- `mainnet`
- `goerli`
- `holesky`

>Note: you can't run tests on the live networks.
In a typical weekly omnibus workflow, you need only `mainnet-fork` and
`mainnet` networks. In case of large test campaign on Lido upgrades,
it also could be useful to go with `goerli` and `goerli-fork` testnets first.

> **Holesky specifics.**
> Due to Holesky not being supported by Infura yet, setting RPC URL for Holesky is different. Instead of setting `WEB3_INFURA_PROJECT_ID` env variable set `HOLESKY_RPC_URL`.
> **Holesky is partially supported.**
> At the moment not all parameters are set in `configs/config_holesky.py` and acceptance/regression/snapshot tests are not operational.
### Environment variables setup

Despite the chosen network you always need to set the following var:
Expand Down
91 changes: 91 additions & 0 deletions configs/config_holesky.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Ethereum Chain parameters
CHAIN_NETWORK_NAME = "holesky"
CHAIN_SLOTS_PER_EPOCH = 32
CHAIN_SECONDS_PER_SLOT = 12
CHAIN_GENESIS_TIME = 1695902400
CHAIN_DEPOSIT_CONTRACT = "0x4242424242424242424242424242424242424242"

# DAO
ARAGON_KERNEL = "0x3b03f75Ec541Ca11a223bB58621A3146246E1644"
LDO_TOKEN = "0x14ae7daeecdf57034f3E9db8564e46Dba8D97344"
ARAGON_KERNEL_IMPL = "0x34c0cbf9836FD945423bD3d2d72880da9d068E5F"

# Standard (or forked) Aragon apps
ACL = "0xfd1E42595CeC3E83239bf8dFc535250e7F48E0bC"
AGENT = "0xE92329EC7ddB11D25e25b3c21eeBf11f15eB325d"
FINANCE = "0xf0F281E5d7FBc54EAFcE0dA225CDbde04173AB16"
VOTING = "0xdA7d2573Df555002503F29aA4003e398d28cc00f"
TOKEN_MANAGER = "0xFaa1692c6eea8eeF534e7819749aD93a1420379A"
ACL_IMPL = "0xF1A087E055EA1C11ec3B540795Bd1A544e6dcbe9"
VOTING_IMPL = "0x994c92228803e8b2D0fb8a610AbCB47412EeF8eF"

# Our custom Aragon apps
LIDO = "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"
LEGACY_ORACLE = "0x072f72BE3AcFE2c52715829F2CD9061A6C8fF019"
NODE_OPERATORS_REGISTRY = "0x595F64Ddc3856a3b5Ff4f4CC1d1fb4B46cFd2bAC"

# Aragon APM Repos
VOTING_REPO = "0x2997EA0D07D79038D83Cb04b3BB9A2Bc512E3fDA"
LIDO_REPO = "0xA37fb4C41e7D30af5172618a863BBB0f9042c604"
NODE_OPERATORS_REGISTRY_REPO = "0x4E8970d148CB38460bE9b6ddaab20aE2A74879AF"
LEGACY_ORACLE_REPO = "0xB3d74c319C0C792522705fFD3097f873eEc71764"

## LIDO_ARAGON_REPO_IMPL is common for Lido, NodeOperatorsRegistry, Oracle aragon apps
ARAGON_COMMON_REPO_IMPL = "0x8959360c48D601a6817BAf2449E5D00cC543FA3A"

# Other Aragon contracts
## For LIDO_EVM_SCRIPT_REGISTRY see Aragon Agent 0x853cc0D5917f49B57B8e9F89e491F5E18919093A
ARAGON_EVMSCRIPT_REGISTRY = "0xE1200ae048163B67D69Bc0492bF5FddC3a2899C0"
## See getEVMScriptExecutor(0x00000001) of any Aragon App or callsScript of LIDO_EASYTRACK_EVMSCRIPTEXECUTOR
ARAGON_CALLS_SCRIPT = "0xAa8B4F258a4817bfb0058b861447878168ddf7B0"

# Other (non-aragon) protocol contracts
WSTETH_TOKEN = "0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"

EXECUTION_LAYER_REWARDS_VAULT = "0xE73a3602b99f1f913e72F8bdcBC235e206794Ac8"

WITHDRAWAL_VAULT = "0xF0179dEC45a37423EAD4FaD5fCb136197872EAd9"

# EasyTracks
EASYTRACK = "0x1763b9ED3586B08AE796c7787811a2E1bc16163a"

EASYTRACK_EVMSCRIPT_EXECUTOR = "0x2819B65021E13CEEB9AC33E77DB32c7e64e7520D"
EASYTRACK_INCREASE_NOP_STAKING_LIMIT_FACTORY = ""

# Multisigs
FINANCE_MULTISIG = ""

# Other
INSURANCE_FUND = ""
RELAY_ALLOWED_LIST = ""
CURVE_REWARDS_MANAGER = ""
BALANCER_REWARDS_MANAGER = ""

# Auxiliary addresses
LDO_HOLDER_ADDRESS_FOR_TESTS = "0xCD1f9954330AF39a74Fd6e7B25781B4c24ee373f"
LDO_VOTE_EXECUTORS_FOR_TESTS = [
"0xaa6bfBCD634EE744CB8FE522b29ADD23124593D3",
"0xBA59A84C6440E8cccfdb5448877E26F1A431Fc8B",
"0x1D835790d93a28fb30d998C0CB27426E5D2D7C8c",
]
# General network addresses
DAI_TOKEN = ""
USDT_TOKEN = ""
USDC_TOKEN = ""
WETH_TOKEN = ""


#
LIDO_LOCATOR = "0x28FAB2059C713A7F9D8c86Db49f9bb0e96Af1ef8"
WITHDRAWAL_QUEUE = "0xc7cc160b58F8Bb0baC94b80847E2CF2800565C50"
ORACLE_DAEMON_CONFIG = "0xC01fC1F2787687Bc656EAc0356ba9Db6e6b7afb7"
ORACLE_REPORT_SANITY_CHECKER = "0xF0d576c7d934bBeCc68FE15F1c5DAF98ea2B78bb"
BURNER = "0x4E46BD7147ccf666E1d73A3A456fC7a68de82eCA"
DEPOSIT_SECURITY_MODULE = "0x045dd46212A178428c088573A7d102B9d89a022A"
ACCOUNTING_ORACLE = "0x4E97A3972ce8511D87F334dA17a2C332542a5246"
VALIDATORS_EXIT_BUS_ORACLE = "0xffDDF7025410412deaa05E3E1cE68FE53208afcb"
WITHDRAWAL_QUEUE = "0xc7cc160b58F8Bb0baC94b80847E2CF2800565C50"
EIP712_STETH = "0xE154732c5Eab277fd88a9fF6Bdff7805eD97BCB1"
STAKING_ROUTER = "0xd6EbF043D30A7fe46D1Db32BA90a0A51207FE229"

WITHDRAWAL_VAULT_IMPL = "0xd517d9d04DA9B47dA23df91261bd3bF435BE964A"
23 changes: 23 additions & 0 deletions network-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
live:
- name: Ethereum
networks:
- chainid: 17000
explorer: https://api-holesky.etherscan.io/api
host: $HOLESKY_RPC_URL
id: holesky
# New backward-compatible multicall contract. multicall2 is missing on Holesky. See https://github.com/mds1/multicall
multicall2: "0xcA11bde05977b3631167028862bE2a173976CA11"
name: Holesky (Infura)
provider: infura
development:
- cmd: ./ganache.sh
cmd_settings:
Expand All @@ -24,6 +35,18 @@ development:
id: goerli-fork
name: goerli-fork
timeout: 360
- cmd: ./ganache.sh
cmd_settings:
accounts: 10
chain_id: 17000
fork: $HOLESKY_RPC_URL
gas_limit: 30000000
mnemonic: brownie
port: 8545
host: http://127.0.0.1
id: holesky-fork
name: holesky-fork
timeout: 360
- cmd: ./ganache.sh
cmd_settings:
accounts: 10
Expand Down
7 changes: 5 additions & 2 deletions utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ def network_name() -> Optional[str]:
if network_name() in ("goerli", "goerli-fork"):
print(f'Using {color("cyan")}config_goerli.py{color} addresses')
from configs.config_goerli import *
elif network_name() in ("holesky", "holesky-fork"):
print(f'Using {color("cyan")}config_holesky.py{color} addresses')
from configs.config_holesky import *
else:
print(f'Using {color("magenta")}config_mainnet.py{color} addresses')
from configs.config_mainnet import *


def get_is_live() -> bool:
dev_networks = ["development", "hardhat", "hardhat-fork", "goerli-fork", "local-fork", "mainnet-fork"]
dev_networks = ["development", "hardhat", "hardhat-fork", "goerli-fork", "local-fork", "mainnet-fork", "holesky-fork"]
return network.show_active() not in dev_networks


Expand Down Expand Up @@ -227,7 +230,7 @@ def dai_token(self) -> interface.ERC20:
@property
def usdt_token(self) -> interface.ERC20:
return interface.ERC20(USDT_TOKEN)

@property
def usdc_token(self) -> interface.ERC20:
return interface.ERC20(USDC_TOKEN)
Expand Down

0 comments on commit 921471c

Please sign in to comment.