Skip to content
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

Add holesky network configs #65

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
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
22 changes: 22 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 @@ -22,3 +33,14 @@ development:
host: http://127.0.0.1
id: goerli-fork
name: goerli-fork
- cmd: ./ganache.sh
cmd_settings:
accounts: 10
chain_id: 17000
fork: $HOLESKY_RPC_URL
gas_limit: 12000000
mnemonic: brownie
port: 8545
host: http://127.0.0.1
id: holesky-fork
name: holesky-fork
6 changes: 5 additions & 1 deletion scripts/acceptance_test_full_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from utils.config import (
get_network_name,
)
from utils import lido, deployed_easy_track, log, deployment
from utils import lido, deployed_easy_track, deployed_date_time, log, deployment
from hexbytes import HexBytes

ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE = (
Expand Down Expand Up @@ -52,6 +52,7 @@ def main():

contracts = lido.contracts(network=network_name)
et_contracts = deployed_easy_track.contracts(network=network_name)
date_time_contract = deployed_date_time.date_time_contract(network=network_name)

evm_script_executor = et_contracts.evm_script_executor

Expand Down Expand Up @@ -97,6 +98,9 @@ def main():
remove_allowed_recipient_address
)

assert registry.bokkyPooBahsDateTimeContract() == date_time_contract
assert top_up_allowed_recipients.easyTrack() == et_contracts.easy_track
assert top_up_allowed_recipients.finance() == contracts.aragon.finance
assert top_up_allowed_recipients.token() == deploy_config.token
assert top_up_allowed_recipients.allowedRecipientsRegistry() == registry
assert top_up_allowed_recipients.trustedCaller() == deploy_config.trusted_caller
Expand Down
13 changes: 8 additions & 5 deletions scripts/migrate_reward_programs_to_allowed_recipient.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def main():
if (not (network_name == "goerli" or network_name == "goerli-fork")):
raise EnvironmentError("network is not supported")

if (not (network_name == "holesky" or network_name == "holesky-fork")):
raise EnvironmentError("network is not supported")

recipients = [
"0xbbe8dDEf5BF31b71Ff5DbE89635f9dB4DeFC667E",
"0x07fC01f46dC1348d7Ce43787b5Bbd52d8711a92D",
Expand Down Expand Up @@ -62,7 +65,7 @@ def main():
log.ok("Limit", limit)
log.ok("Period", period)
log.ok("Spent amount", spent_amount)

log.ok("Aragon Finance", contracts.aragon.finance)
log.ok("Aragon Agent", contracts.aragon.agent)
log.ok("EasyTrack", easy_track)
Expand All @@ -76,18 +79,18 @@ def main():
log.nb("Aborting")
return

tx_params = {
tx_params = {
"from": deployer,
"priority_fee": "2 gwei",
"max_fee": "50 gwei"
}

tx = allowed_recipients_builder.deployFullSetup(
trusted_caller,
contracts.ldo,
limit,
contracts.ldo,
limit,
period,
recipients,
recipients,
titles,
spent_amount,
tx_params
Expand Down
1 change: 1 addition & 0 deletions utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def get_is_live():
"hardhat",
"hardhat-fork",
"mainnet-fork",
"holesky-fork",
"goerli-fork"
]
return network.show_active() not in dev_networks
Expand Down
2 changes: 2 additions & 0 deletions utils/deployed_date_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ def date_time_contract(network: str = "mainnet") -> str:
return "0x75100bd564415731b5936a4a94d0dc29dde5db3c"
if network == "goerli" or network == "goerli-fork":
return "0xb1e4de1092D0D32613e4BbFBf4D68650862f43A6"
if network == "holesky" or network == "holesky-fork":
return "0xd6237FecDF9C1D9b023A5205C17549E3037EeEec"
raise NameError(f"""Unknown network "{network}". Supported networks: mainnet, goerli.""")
21 changes: 20 additions & 1 deletion utils/deployed_easy_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ def addresses(network="mainnet"):
reward_programs_registry="0xfCaD241D9D2A2766979A2de208E8210eDf7b7D4F",
),
)
if network == "holesky" or network == "holesky-fork":
return EasyTrackSetup(
easy_track="0x1763b9ED3586B08AE796c7787811a2E1bc16163a",
evm_script_executor="0x2819B65021E13CEEB9AC33E77DB32c7e64e7520D",
increase_node_operator_staking_limit="",
top_up_lego_program="",
reward_programs=RewardPrograms(
add_reward_program="",
remove_reward_program="",
top_up_reward_programs="",
reward_programs_registry="",
),
referral_partners=RewardPrograms(
add_reward_program="",
remove_reward_program="",
top_up_reward_programs="",
reward_programs_registry="",
),
)
if network == "goerli" or network == "goerli-fork":
return EasyTrackSetup(
easy_track="0xAf072C8D368E4DD4A9d4fF6A76693887d6ae92Af",
Expand All @@ -52,7 +71,7 @@ def addresses(network="mainnet"):
),
)
raise NameError(
f"""Unknown network "{network}". Supported networks: mainnet, goerli."""
f"""Unknown network "{network}". Supported networks: mainnet, holesky, goerli."""
)


Expand Down
22 changes: 20 additions & 2 deletions utils/lido.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ def addresses(network=DEFAULT_NETWORK):
steth="0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
node_operators_registry="0x55032650b14df07b85bf18a3a3ec8e0af2e028d5",
)
if network == "holesky" or network == "holesky-fork":
return LidoAddressesSetup(
aragon=AragonSetup(
acl="0xfd1E42595CeC3E83239bf8dFc535250e7F48E0bC",
agent="0xE92329EC7ddB11D25e25b3c21eeBf11f15eB325d",
voting="0xdA7d2573Df555002503F29aA4003e398d28cc00f",
finance="0xf0F281E5d7FBc54EAFcE0dA225CDbde04173AB16",
gov_token="0x14ae7daeecdf57034f3E9db8564e46Dba8D97344",
calls_script="0xAa8B4F258a4817bfb0058b861447878168ddf7B0",
token_manager="0xFaa1692c6eea8eeF534e7819749aD93a1420379A",
),
steth="0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034",
node_operators_registry="0x595F64Ddc3856a3b5Ff4f4CC1d1fb4B46cFd2bAC",
)
if network == "goerli" or network == "goerli-fork":
return LidoAddressesSetup(
aragon=AragonSetup(
Expand All @@ -33,7 +47,7 @@ def addresses(network=DEFAULT_NETWORK):
node_operators_registry="0x9d4af1ee19dad8857db3a45b0374c81c8a1c6320",
)
raise NameError(
f"""Unknown network "{network}". Supported networks: mainnet, mainnet-fork goerli, goerli-fork"""
f"""Unknown network "{network}". Supported networks: mainnet, mainnet-fork, holesky, holesky-fork, goerli, goerli-fork"""
)


Expand All @@ -46,12 +60,16 @@ def allowed_recipients_builder(network=DEFAULT_NETWORK):
return brownie.AllowedRecipientsBuilder.at(
"0x958e0D946D014F377421a53AB5f9180d4485e63B"
)
if network == "holesky" or network == "holesky-fork":
return brownie.AllowedRecipientsBuilder.at(
"0xeC3785b13b21c226D66B5bC2E82BB2f4226f715e"
)
if network == "goerli" or network == "goerli-fork":
return brownie.AllowedRecipientsBuilder.at(
"0x1082512D1d60a0480445353eb55de451D261b684"
)
raise NameError(
f"""Unknown network "{network}". Supported networks: mainnet, mainnet-fork goerli, goerli-fork"""
f"""Unknown network "{network}". Supported networks: mainnet, mainnet-fork, holesky, holesky-fork, goerli, goerli-fork"""
)


Expand Down
Loading