Skip to content

Commit

Permalink
Merge branch 'develop' into feature/extra-nor-factories
Browse files Browse the repository at this point in the history
  • Loading branch information
bulbozaur committed Apr 22, 2024
2 parents 83f8c1c + a4d54dc commit 12bfab3
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 9 deletions.
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
6 changes: 5 additions & 1 deletion scripts/acceptance_test_single_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,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 @@ -45,6 +45,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 @@ -77,10 +78,13 @@ def main():
registry = AllowedRecipientsRegistry.at(registry_address)
top_up_allowed_recipients = TopUpAllowedRecipients.at(add_allowed_recipient_address)

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

assert registry.bokkyPooBahsDateTimeContract() == date_time_contract
assert len(registry.getAllowedRecipients()) == 1
assert registry.isRecipientAllowed(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
2 changes: 1 addition & 1 deletion utils/deployed_date_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ def date_time_contract(network: str = "mainnet") -> str:
if network == "goerli" or network == "goerli-fork":
return "0xb1e4de1092D0D32613e4BbFBf4D68650862f43A6"
if network == "holesky" or network == "holesky-fork":
return "0x8809f6174182D22983DCCA1c48e2da3b9593736c"
return "0xd6237FecDF9C1D9b023A5205C17549E3037EeEec"
raise NameError(f"""Unknown network "{network}". Supported networks: mainnet, goerli, holesky.""")
19 changes: 19 additions & 0 deletions 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 Down
20 changes: 19 additions & 1 deletion utils/lido.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ def addresses(network=DEFAULT_NETWORK):
staking_router="0xFdDf38947aFB03C621C71b06C9C70bce73f12999",
locator="0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb",
)
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 Down Expand Up @@ -73,12 +87,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

0 comments on commit 12bfab3

Please sign in to comment.