From f75ac8aa962ca53ae69a00507b21642aa9d13cab Mon Sep 17 00:00:00 2001 From: sendra Date: Mon, 16 Oct 2023 17:25:51 +0200 Subject: [PATCH 1/8] feat: zkevm deployment --- .env.example | 3 +++ deployments/cc/mainnet/zkevm.json | 24 ++++++++++++++++++ deployments/gov/mainnet/zkevm.json | 25 +++++++++++++++++++ foundry.toml | 4 +++ lib/aave-address-book | 2 +- lib/aave-delivery-infrastructure | 2 +- scripts/Deploy_ContractHelpers.s.sol | 6 +++++ scripts/GovBaseScript.sol | 4 +++ scripts/InitialDeployments.s.sol | 16 +++++++++--- scripts/Payloads/Deploy_ExecutorLvl1.s.sol | 6 +++++ .../Payloads/Deploy_PayloadsController.s.sol | 10 ++++++++ 11 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 deployments/cc/mainnet/zkevm.json create mode 100644 deployments/gov/mainnet/zkevm.json diff --git a/.env.example b/.env.example index 17af2e9..29009f9 100644 --- a/.env.example +++ b/.env.example @@ -24,6 +24,8 @@ RPC_BASE=https://developer-access-mainnet.base.org RPC_BASE_TESTNET=https://goerli.base.org RPC_GNOSIS=https://rpc.gnosischain.com RPC_GNOSIS_TESTNET=https://rpc.chiadochain.net +RPC_ZKEVM=https://polygon-zkevm.drpc.org +RPC_ZKEVM_TESTNET=https://rpc.public.zkevm-test.net # Etherscan api keys for verification & download utils ETHERSCAN_API_KEY_MAINNET= @@ -34,3 +36,4 @@ ETHERSCAN_API_KEY_ARBITRUM= ETHERSCAN_API_KEY_BINANCE= ETHERSCAN_API_KEY_BASE= ETHERSCAN_API_KEY_GNOSIS= +ETHERSCAN_API_KEY_ZKEVM= diff --git a/deployments/cc/mainnet/zkevm.json b/deployments/cc/mainnet/zkevm.json new file mode 100644 index 0000000..61a3853 --- /dev/null +++ b/deployments/cc/mainnet/zkevm.json @@ -0,0 +1,24 @@ +{ + "arbAdapter": "0x0000000000000000000000000000000000000000", + "baseAdapter": "0x0000000000000000000000000000000000000000", + "ccipAdapter": "0x0000000000000000000000000000000000000000", + "chainId": 1101, + "clEmergencyOracle": "0x0000000000000000000000000000000000000000", + "create3Factory": "0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19", + "crossChainController": "0xed7e0874526B9BB9E36C7e9472ed7ed324CEeE3B", + "crossChainControllerImpl": "0x7b62461a3570c6AC8a9f8330421576e417B71EE7", + "emergencyRegistry": "0x0000000000000000000000000000000000000000", + "gnosisAdapter": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "hlAdapter": "0x0000000000000000000000000000000000000000", + "lzAdapter": "0x0000000000000000000000000000000000000000", + "metisAdapter": "0x0000000000000000000000000000000000000000", + "mockDestination": "0x81d32B36380e6266e1BDd490eAC56cdB300afBe0", + "opAdapter": "0x0000000000000000000000000000000000000000", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "polAdapter": "0x0000000000000000000000000000000000000000", + "proxyAdmin": "0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2", + "proxyFactory": "0x8B6851156023f4f5A66F68BEA80851c3D905Ac93", + "sameChainAdapter": "0x0000000000000000000000000000000000000000", + "zkevmAdapter": "0x889c0cc3283DB588A34E89Ad1E8F25B0fc827b4b" +} \ No newline at end of file diff --git a/deployments/gov/mainnet/zkevm.json b/deployments/gov/mainnet/zkevm.json new file mode 100644 index 0000000..576c38e --- /dev/null +++ b/deployments/gov/mainnet/zkevm.json @@ -0,0 +1,25 @@ +{ + "aavePool": "0x0000000000000000000000000000000000000000", + "chainId": 1101, + "create3Factory": "0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19", + "dataWarehouse": "0x0000000000000000000000000000000000000000", + "executorLvl1": "0xe59470B3BE3293534603487E00A44C72f2CD466d", + "executorLvl2": "0x0000000000000000000000000000000000000000", + "governance": "0x0000000000000000000000000000000000000000", + "governanceDataHelper": "0x0000000000000000000000000000000000000000", + "governanceImpl": "0x0000000000000000000000000000000000000000", + "governancePowerStrategy": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "metaDelegateHelper": "0x0000000000000000000000000000000000000000", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "payloadsController": "0xa2d22795E0D85D4Cb14Cbb14Df7bb8fec1016615", + "payloadsControllerDataHelper": "0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672", + "payloadsControllerImpl": "0x746c675dAB49Bcd5BB9Dc85161f2d7Eb435009bf", + "votingMachine": "0x0000000000000000000000000000000000000000", + "votingMachineDataHelper": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Avax": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_BNB": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Eth": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Pol": "0x0000000000000000000000000000000000000000", + "votingStrategy": "0x0000000000000000000000000000000000000000" +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 293e5be..1c91df4 100644 --- a/foundry.toml +++ b/foundry.toml @@ -34,6 +34,8 @@ base="${RPC_BASE}" base-testnet="${RPC_BASE_TESTNET}" gnosis="${RPC_GNOSIS}" gnosis-testnet="${RPC_GNOSIS_TESTNET}" +zkevm="${RPC_ZKEVM}" +zkevm-testnet="${RPC_ZKEVM_TESTNET}" [etherscan] ethereum={key="${ETHERSCAN_API_KEY_MAINNET}", chain=1 } @@ -54,6 +56,8 @@ base={key="${ETHERSCAN_API_KEY_BASE}",chain=8453} base-testnet={key="${ETHERSCAN_API_KEY_BASE}",chain=84531} gnosis={key="${ETHERSCAN_API_KEY_GNOSIS}",chain=100} gnosis-testnet={key="${ETHERSCAN_API_KEY_GNOSIS}",chain=10200, url='https://gnosis-chiado.blockscout.com/'} +zkevm={key="${ETHERSCAN_API_KEY_ZKEVM}",chain=1101} +zkevm-testnet={key="${ETHERSCAN_API_KEY_ZKEVM}",chain=1442} diff --git a/lib/aave-address-book b/lib/aave-address-book index 35285a2..96992a3 160000 --- a/lib/aave-address-book +++ b/lib/aave-address-book @@ -1 +1 @@ -Subproject commit 35285a26991ce19cddca48a8fe4f6ce50ece5943 +Subproject commit 96992a3b2b3cb635cb828b12fa0e418bbf053182 diff --git a/lib/aave-delivery-infrastructure b/lib/aave-delivery-infrastructure index 2bc11b9..4a06522 160000 --- a/lib/aave-delivery-infrastructure +++ b/lib/aave-delivery-infrastructure @@ -1 +1 @@ -Subproject commit 2bc11b95c4b8c2fd30e1c66dad0c21ea5111eac6 +Subproject commit 4a0652280276b8b170b59cd3762f088bc1df5f11 diff --git a/scripts/Deploy_ContractHelpers.s.sol b/scripts/Deploy_ContractHelpers.s.sol index d20912d..349ffc1 100644 --- a/scripts/Deploy_ContractHelpers.s.sol +++ b/scripts/Deploy_ContractHelpers.s.sol @@ -88,6 +88,12 @@ contract Gnosis is BaseContractHelpers { } } +contract Zkevm is BaseContractHelpers { + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.POLYGON_ZK_EVM; + } +} + contract Ethereum_testnet is BaseContractHelpers { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; diff --git a/scripts/GovBaseScript.sol b/scripts/GovBaseScript.sol index 5e9b2e0..7641806 100644 --- a/scripts/GovBaseScript.sol +++ b/scripts/GovBaseScript.sol @@ -64,6 +64,8 @@ library GovDeployerHelpers { return './deployments/gov/mainnet/base.json'; } else if (chainId == ChainIds.GNOSIS) { return './deployments/gov/mainnet/gnosis.json'; + } else if (chainId == ChainIds.POLYGON_ZK_EVM) { + return './deployments/gov/mainnet/zkevm.json'; } if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) { return './deployments/gov/testnet/sep.json'; @@ -85,6 +87,8 @@ library GovDeployerHelpers { return './deployments/gov/testnet/base_go.json'; } else if (chainId == TestNetChainIds.GNOSIS_CHIADO) { return './deployments/gov/testnet/gnosis_chiado.json'; + } else if (chainId == TestNetChainIds.POLYGON_ZK_EVM_GOERLI) { + return './deployments/gov/testnet/zkevm_go.json'; } else { revert('chain id is not supported'); } diff --git a/scripts/InitialDeployments.s.sol b/scripts/InitialDeployments.s.sol index e37320f..c0c10e9 100644 --- a/scripts/InitialDeployments.s.sol +++ b/scripts/InitialDeployments.s.sol @@ -22,9 +22,9 @@ abstract contract BaseInitialDeployment is GovBaseScript { function _execute( GovDeployerHelpers.Addresses memory addresses ) internal override { - addresses.create3Factory = CREATE3_FACTORY() == address(0) - ? address(new Create3Factory{salt: Constants.CREATE3_FACTORY_SALT}()) - : CREATE3_FACTORY(); +// addresses.create3Factory = CREATE3_FACTORY() == address(0) +// ? address(new Create3Factory{salt: Constants.CREATE3_FACTORY_SALT}()) +// : CREATE3_FACTORY(); addresses.chainId = TRANSACTION_NETWORK(); addresses.owner = OWNER(); addresses.guardian = GUARDIAN(); @@ -121,6 +121,16 @@ contract Gnosis is BaseInitialDeployment { } } +contract Zkevm is BaseInitialDeployment { +// function GUARDIAN() public pure override returns (address) { +// return 0xF163b8698821cefbD33Cf449764d69Ea445cE23D; +// } + + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.POLYGON_ZK_EVM; + } +} + contract Ethereum_testnet is BaseInitialDeployment { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; diff --git a/scripts/Payloads/Deploy_ExecutorLvl1.s.sol b/scripts/Payloads/Deploy_ExecutorLvl1.s.sol index e1f5486..515dd84 100644 --- a/scripts/Payloads/Deploy_ExecutorLvl1.s.sol +++ b/scripts/Payloads/Deploy_ExecutorLvl1.s.sol @@ -88,6 +88,12 @@ contract Gnosis is BaseDeployExecutorLvl1 { } } +contract Zkevm is BaseDeployExecutorLvl1 { + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.POLYGON_ZK_EVM; + } +} + contract Ethereum_testnet is BaseDeployExecutorLvl1 { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; diff --git a/scripts/Payloads/Deploy_PayloadsController.s.sol b/scripts/Payloads/Deploy_PayloadsController.s.sol index 5905055..66008b5 100644 --- a/scripts/Payloads/Deploy_PayloadsController.s.sol +++ b/scripts/Payloads/Deploy_PayloadsController.s.sol @@ -229,6 +229,16 @@ contract Gnosis is BaseDeployPayloadsController { } } +contract Zkevm is BaseDeployPayloadsController { + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.POLYGON_ZK_EVM; + } + + function GOVERNANCE_NETWORK() public pure override returns (uint256) { + return ChainIds.ETHEREUM; + } +} + contract Ethereum_testnet is BaseDeployPayloadsController { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; From b6aea43d98e95f27cf9b4863e3e0dc1c2bc16df8 Mon Sep 17 00:00:00 2001 From: sendra Date: Wed, 3 Jan 2024 10:39:47 +0100 Subject: [PATCH 2/8] fix: lib updates --- lib/aave-address-book | 2 +- lib/aave-delivery-infrastructure | 2 +- lib/aave-token-v3 | 2 +- lib/forge-std | 2 +- lib/openzeppelin-contracts | 2 +- lib/solidity-utils | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/aave-address-book b/lib/aave-address-book index c852ff7..ee8a24e 160000 --- a/lib/aave-address-book +++ b/lib/aave-address-book @@ -1 +1 @@ -Subproject commit c852ff7c1b0d0bd45b1a2916dca63d3031b1684f +Subproject commit ee8a24e7799574386224853ad4bb15f3b470490f diff --git a/lib/aave-delivery-infrastructure b/lib/aave-delivery-infrastructure index 4a06522..629aa8a 160000 --- a/lib/aave-delivery-infrastructure +++ b/lib/aave-delivery-infrastructure @@ -1 +1 @@ -Subproject commit 4a0652280276b8b170b59cd3762f088bc1df5f11 +Subproject commit 629aa8a769f795da099558c4b47502f40df078d8 diff --git a/lib/aave-token-v3 b/lib/aave-token-v3 index 874ffdb..994f1d3 160000 --- a/lib/aave-token-v3 +++ b/lib/aave-token-v3 @@ -1 +1 @@ -Subproject commit 874ffdbe2f0af5d28e951deffc272bb14c628d04 +Subproject commit 994f1d39640c55ff0ddb59889f90ce78e854892c diff --git a/lib/forge-std b/lib/forge-std index 1d9650e..87a2a0a 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 1d9650e951204a0ddce9ff89c32f1997984cef4d +Subproject commit 87a2a0afc5fafd6297538a45a52ac19e71a84562 diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts index 98c7a4c..bd325d5 160000 --- a/lib/openzeppelin-contracts +++ b/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit 98c7a4cf958f7014e3c5347aeb0678b585eb870d +Subproject commit bd325d56b4c62c9c5c1aff048c37c6bb18ac0290 diff --git a/lib/solidity-utils b/lib/solidity-utils index 56720ad..7a7548c 160000 --- a/lib/solidity-utils +++ b/lib/solidity-utils @@ -1 +1 @@ -Subproject commit 56720adb8b751c3742a5f9b8c5bcb8a9446ba941 +Subproject commit 7a7548c1d01f011febdb1c0d47e52c7ec6c30f9d From 52123c3dbbf2f426790be5731042e2c1fcb9c0c6 Mon Sep 17 00:00:00 2001 From: sendra Date: Wed, 3 Jan 2024 10:47:39 +0100 Subject: [PATCH 3/8] fix: moved aDI to correct commit for zkEVM deployment --- .gitmodules | 1 + lib/aave-delivery-infrastructure | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index d4db887..788ed6b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -17,3 +17,4 @@ [submodule "lib/aave-delivery-infrastructure"] path = lib/aave-delivery-infrastructure url = https://github.com/bgd-labs/aave-delivery-infrastructure + branch = v1.0.0 diff --git a/lib/aave-delivery-infrastructure b/lib/aave-delivery-infrastructure index 629aa8a..e8be663 160000 --- a/lib/aave-delivery-infrastructure +++ b/lib/aave-delivery-infrastructure @@ -1 +1 @@ -Subproject commit 629aa8a769f795da099558c4b47502f40df078d8 +Subproject commit e8be663e1fe86ca4a2f7bf841d9e72ab229511d7 From 3455f00b37b2165571be81daa49e07a3300b9d79 Mon Sep 17 00:00:00 2001 From: sendra Date: Fri, 5 Jan 2024 11:35:03 +0100 Subject: [PATCH 4/8] fix: fixed to work with current aDI --- .gitmodules | 1 - lib/aave-delivery-infrastructure | 2 +- tests/mock/MockCrossChainInfra.sol | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 788ed6b..d4db887 100644 --- a/.gitmodules +++ b/.gitmodules @@ -17,4 +17,3 @@ [submodule "lib/aave-delivery-infrastructure"] path = lib/aave-delivery-infrastructure url = https://github.com/bgd-labs/aave-delivery-infrastructure - branch = v1.0.0 diff --git a/lib/aave-delivery-infrastructure b/lib/aave-delivery-infrastructure index e8be663..629aa8a 160000 --- a/lib/aave-delivery-infrastructure +++ b/lib/aave-delivery-infrastructure @@ -1 +1 @@ -Subproject commit e8be663e1fe86ca4a2f7bf841d9e72ab229511d7 +Subproject commit 629aa8a769f795da099558c4b47502f40df078d8 diff --git a/tests/mock/MockCrossChainInfra.sol b/tests/mock/MockCrossChainInfra.sol index 9649b56..1794cf5 100644 --- a/tests/mock/MockCrossChainInfra.sol +++ b/tests/mock/MockCrossChainInfra.sol @@ -15,6 +15,7 @@ contract MockToImport { new LayerZeroAdapter( address(0), address(0), + 0, new LayerZeroAdapter.TrustedRemotesConfig[](0) ); new Executor(); From 72214571ec989594601f352a360f2e54dcbe900d Mon Sep 17 00:00:00 2001 From: sendra Date: Fri, 5 Jan 2024 11:58:57 +0100 Subject: [PATCH 5/8] fix: add scroll scripts and deployments --- .env.example | 3 ++ deployments/cc/mainnet/pre_prod_eth.json | 25 +++++++++++++++++ deployments/cc/mainnet/pre_prod_scroll.json | 25 +++++++++++++++++ deployments/cc/mainnet/scroll.json | 25 +++++++++++++++++ deployments/gov/mainnet/pre_prod_eth.json | 26 +++++++++++++++++ deployments/gov/mainnet/pre_prod_scroll.json | 26 +++++++++++++++++ deployments/gov/mainnet/scroll.json | 26 +++++++++++++++++ foundry.toml | 4 +++ scripts/Deploy_ContractHelpers.s.sol | 6 ++++ scripts/InitialDeployments.s.sol | 28 +++++++++++++------ scripts/Payloads/Deploy_ExecutorLvl1.s.sol | 6 ++++ .../Payloads/Deploy_PayloadsController.s.sol | 10 +++++++ 12 files changed, 201 insertions(+), 9 deletions(-) create mode 100644 deployments/cc/mainnet/pre_prod_eth.json create mode 100644 deployments/cc/mainnet/pre_prod_scroll.json create mode 100644 deployments/cc/mainnet/scroll.json create mode 100644 deployments/gov/mainnet/pre_prod_eth.json create mode 100644 deployments/gov/mainnet/pre_prod_scroll.json create mode 100644 deployments/gov/mainnet/scroll.json diff --git a/.env.example b/.env.example index 29009f9..fad6843 100644 --- a/.env.example +++ b/.env.example @@ -26,6 +26,8 @@ RPC_GNOSIS=https://rpc.gnosischain.com RPC_GNOSIS_TESTNET=https://rpc.chiadochain.net RPC_ZKEVM=https://polygon-zkevm.drpc.org RPC_ZKEVM_TESTNET=https://rpc.public.zkevm-test.net +RPC_SCROLL=https://rpc.scroll.io +RPC_SCROLL_TESTNET=https://sepolia-rpc.scroll.io # Etherscan api keys for verification & download utils ETHERSCAN_API_KEY_MAINNET= @@ -37,3 +39,4 @@ ETHERSCAN_API_KEY_BINANCE= ETHERSCAN_API_KEY_BASE= ETHERSCAN_API_KEY_GNOSIS= ETHERSCAN_API_KEY_ZKEVM= +ETHERSCAN_API_KEY_SCROLL= diff --git a/deployments/cc/mainnet/pre_prod_eth.json b/deployments/cc/mainnet/pre_prod_eth.json new file mode 100644 index 0000000..a1b1641 --- /dev/null +++ b/deployments/cc/mainnet/pre_prod_eth.json @@ -0,0 +1,25 @@ +{ + "arbAdapter": "0x0000000000000000000000000000000000000000", + "baseAdapter": "0x0000000000000000000000000000000000000000", + "ccipAdapter": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "clEmergencyOracle": "0x0000000000000000000000000000000000000000", + "create3Factory": "0x0000000000000000000000000000000000000000", + "crossChainController": "0x8E0cE624befC5226dA99276c5c272f3bf83462E3", + "crossChainControllerImpl": "0x27b849DFCFEa88048b3Fd8150Dd3975238c3BfaC", + "emergencyRegistry": "0x0000000000000000000000000000000000000000", + "gnosisAdapter": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "hlAdapter": "0x0000000000000000000000000000000000000000", + "lzAdapter": "0x0000000000000000000000000000000000000000", + "metisAdapter": "0x0000000000000000000000000000000000000000", + "mockDestination": "0x0000000000000000000000000000000000000000", + "opAdapter": "0x0000000000000000000000000000000000000000", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "polAdapter": "0x0000000000000000000000000000000000000000", + "proxyAdmin": "0x28D7de3839D70FD27E80b5cCE9CDea7a26a55184", + "proxyFactory": "0xB4e496f70602fE2AC6Ae511D028BA4D194773B29", + "sameChainAdapter": "0x0000000000000000000000000000000000000000", + "scrollAdapter": "0xb174AD8852d384AC58eaFC61ee87386dbDdc3e19", + "zkevmAdapter": "0x0000000000000000000000000000000000000000" +} diff --git a/deployments/cc/mainnet/pre_prod_scroll.json b/deployments/cc/mainnet/pre_prod_scroll.json new file mode 100644 index 0000000..fa9d848 --- /dev/null +++ b/deployments/cc/mainnet/pre_prod_scroll.json @@ -0,0 +1,25 @@ +{ + "arbAdapter": "0x0000000000000000000000000000000000000000", + "baseAdapter": "0x0000000000000000000000000000000000000000", + "ccipAdapter": "0x0000000000000000000000000000000000000000", + "chainId": 534352, + "clEmergencyOracle": "0x0000000000000000000000000000000000000000", + "create3Factory": "0x0000000000000000000000000000000000000000", + "crossChainController": "0x03073D3F4769f6b6604d616238fD6c636C99AD0A", + "crossChainControllerImpl": "0xa88c6D90eAe942291325f9ae3c66f3563B93FE10", + "emergencyRegistry": "0x0000000000000000000000000000000000000000", + "gnosisAdapter": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "hlAdapter": "0x0000000000000000000000000000000000000000", + "lzAdapter": "0x0000000000000000000000000000000000000000", + "metisAdapter": "0x0000000000000000000000000000000000000000", + "mockDestination": "0x0000000000000000000000000000000000000000", + "opAdapter": "0x0000000000000000000000000000000000000000", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "polAdapter": "0x0000000000000000000000000000000000000000", + "proxyAdmin": "0x2EE735E371C0a2Ce832510DbbB6Ed90671269989", + "proxyFactory": "0xFa2eeb2d0054C3Db2A606E2cd9EE111b62707D1e", + "sameChainAdapter": "0x0000000000000000000000000000000000000000", + "scrollAdapter": "0x96F68837877fd0414B55050c9e794AECdBcfCA59", + "zkevmAdapter": "0x0000000000000000000000000000000000000000" +} diff --git a/deployments/cc/mainnet/scroll.json b/deployments/cc/mainnet/scroll.json new file mode 100644 index 0000000..f12c8fd --- /dev/null +++ b/deployments/cc/mainnet/scroll.json @@ -0,0 +1,25 @@ +{ + "arbAdapter": "0x0000000000000000000000000000000000000000", + "baseAdapter": "0x0000000000000000000000000000000000000000", + "ccipAdapter": "0x0000000000000000000000000000000000000000", + "chainId": 534352, + "clEmergencyOracle": "0x0000000000000000000000000000000000000000", + "create3Factory": "0x0000000000000000000000000000000000000000", + "crossChainController": "0x03073D3F4769f6b6604d616238fD6c636C99AD0A", + "crossChainControllerImpl": "0xa88c6D90eAe942291325f9ae3c66f3563B93FE10", + "emergencyRegistry": "0x0000000000000000000000000000000000000000", + "gnosisAdapter": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "hlAdapter": "0x0000000000000000000000000000000000000000", + "lzAdapter": "0x0000000000000000000000000000000000000000", + "metisAdapter": "0x0000000000000000000000000000000000000000", + "mockDestination": "0x0000000000000000000000000000000000000000", + "opAdapter": "0x0000000000000000000000000000000000000000", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "polAdapter": "0x0000000000000000000000000000000000000000", + "proxyAdmin": "0x782559e349b084bB7C07c08404aE6E3436cDAE2E", + "proxyFactory": "0xFa2eeb2d0054C3Db2A606E2cd9EE111b62707D1e", + "sameChainAdapter": "0x0000000000000000000000000000000000000000", + "scrollAdapter": "0x118DFD5418890c0332042ab05173Db4A2C1d283c", + "zkevmAdapter": "0x0000000000000000000000000000000000000000" +} diff --git a/deployments/gov/mainnet/pre_prod_eth.json b/deployments/gov/mainnet/pre_prod_eth.json new file mode 100644 index 0000000..0fcd25b --- /dev/null +++ b/deployments/gov/mainnet/pre_prod_eth.json @@ -0,0 +1,26 @@ +{ + "aavePool": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "create3Factory": "0x0000000000000000000000000000000000000000", + "dataWarehouse": "0x0000000000000000000000000000000000000000", + "executorLvl1": "0x0000000000000000000000000000000000000000", + "executorLvl2": "0x0000000000000000000000000000000000000000", + "governance": "0x0000000000000000000000000000000000000000", + "governanceDataHelper": "0x0000000000000000000000000000000000000000", + "governanceImpl": "0x0000000000000000000000000000000000000000", + "governancePowerStrategy": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "metaDelegateHelper": "0x0000000000000000000000000000000000000000", + "mockGovernance": "0xac55366fE98D068C8dEeA1b82f3697AA7bacA056", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "payloadsController": "0x0000000000000000000000000000000000000000", + "payloadsControllerDataHelper": "0x0000000000000000000000000000000000000000", + "payloadsControllerImpl": "0x0000000000000000000000000000000000000000", + "votingMachine": "0x0000000000000000000000000000000000000000", + "votingMachineDataHelper": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Avax": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_BNB": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Eth": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Pol": "0x0000000000000000000000000000000000000000", + "votingStrategy": "0x0000000000000000000000000000000000000000" +} diff --git a/deployments/gov/mainnet/pre_prod_scroll.json b/deployments/gov/mainnet/pre_prod_scroll.json new file mode 100644 index 0000000..cd01e5d --- /dev/null +++ b/deployments/gov/mainnet/pre_prod_scroll.json @@ -0,0 +1,26 @@ +{ + "aavePool": "0x0000000000000000000000000000000000000000", + "chainId": 534352, + "create3Factory": "0x0000000000000000000000000000000000000000", + "dataWarehouse": "0x0000000000000000000000000000000000000000", + "executorLvl1": "0x4A4c73d563395ad827511F70097d4Ef82E653805", + "executorLvl2": "0x0000000000000000000000000000000000000000", + "governance": "0x0000000000000000000000000000000000000000", + "governanceDataHelper": "0x0000000000000000000000000000000000000000", + "governanceImpl": "0x0000000000000000000000000000000000000000", + "governancePowerStrategy": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "metaDelegateHelper": "0x0000000000000000000000000000000000000000", + "mockGovernance": "0x0000000000000000000000000000000000000000", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "payloadsController": "0x5C540Dba43247688c4391E144a233B9E1dF3d811", + "payloadsControllerDataHelper": "0x0000000000000000000000000000000000000000", + "payloadsControllerImpl": "0x9390B1735def18560c509E2d0bc090E9d6BA257a", + "votingMachine": "0x0000000000000000000000000000000000000000", + "votingMachineDataHelper": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Avax": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_BNB": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Eth": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Pol": "0x0000000000000000000000000000000000000000", + "votingStrategy": "0x0000000000000000000000000000000000000000" +} diff --git a/deployments/gov/mainnet/scroll.json b/deployments/gov/mainnet/scroll.json new file mode 100644 index 0000000..48465a3 --- /dev/null +++ b/deployments/gov/mainnet/scroll.json @@ -0,0 +1,26 @@ +{ + "aavePool": "0x0000000000000000000000000000000000000000", + "chainId": 534352, + "create3Factory": "0x0000000000000000000000000000000000000000", + "dataWarehouse": "0x0000000000000000000000000000000000000000", + "executorLvl1": "0xc1ABF87FfAdf4908f4eC8dc54A25DCFEabAE4A24", + "executorLvl2": "0x0000000000000000000000000000000000000000", + "governance": "0x0000000000000000000000000000000000000000", + "governanceDataHelper": "0x0000000000000000000000000000000000000000", + "governanceImpl": "0x0000000000000000000000000000000000000000", + "governancePowerStrategy": "0x0000000000000000000000000000000000000000", + "guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "metaDelegateHelper": "0x0000000000000000000000000000000000000000", + "mockGovernance": "0x0000000000000000000000000000000000000000", + "owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6", + "payloadsController": "0x6b6B41c0f8C223715f712BE83ceC3c37bbfDC3fE", + "payloadsControllerDataHelper": "0xf438e33dCCEE260ee4371F9dceF408b0d7DBe424", + "payloadsControllerImpl": "0x986FDCA06d10Baaf923fc032186F0B6AaEb04C42", + "votingMachine": "0x0000000000000000000000000000000000000000", + "votingMachineDataHelper": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Avax": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_BNB": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Eth": "0x0000000000000000000000000000000000000000", + "votingPortal_Eth_Pol": "0x0000000000000000000000000000000000000000", + "votingStrategy": "0x0000000000000000000000000000000000000000" +} diff --git a/foundry.toml b/foundry.toml index 1c91df4..2941ae6 100644 --- a/foundry.toml +++ b/foundry.toml @@ -36,6 +36,8 @@ gnosis="${RPC_GNOSIS}" gnosis-testnet="${RPC_GNOSIS_TESTNET}" zkevm="${RPC_ZKEVM}" zkevm-testnet="${RPC_ZKEVM_TESTNET}" +scroll="${RPC_SCROLL}" +scroll-testnet="${RPC_SCROLL_TESTNET}" [etherscan] ethereum={key="${ETHERSCAN_API_KEY_MAINNET}", chain=1 } @@ -58,6 +60,8 @@ gnosis={key="${ETHERSCAN_API_KEY_GNOSIS}",chain=100} gnosis-testnet={key="${ETHERSCAN_API_KEY_GNOSIS}",chain=10200, url='https://gnosis-chiado.blockscout.com/'} zkevm={key="${ETHERSCAN_API_KEY_ZKEVM}",chain=1101} zkevm-testnet={key="${ETHERSCAN_API_KEY_ZKEVM}",chain=1442} +scroll={key="${ETHERSCAN_API_KEY_SCROLL}", chain=534352, utl='https://api.scrollscan.com/api/'} +scroll-testnet={key="${ETHERSCAN_API_KEY_SCROLL}", chain=534351, url='https://api-sepolia.scrollscan.com/api/'} diff --git a/scripts/Deploy_ContractHelpers.s.sol b/scripts/Deploy_ContractHelpers.s.sol index 349ffc1..53d7064 100644 --- a/scripts/Deploy_ContractHelpers.s.sol +++ b/scripts/Deploy_ContractHelpers.s.sol @@ -94,6 +94,12 @@ contract Zkevm is BaseContractHelpers { } } +contract Scroll is BaseContractHelpers { + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.SCROLL; + } +} + contract Ethereum_testnet is BaseContractHelpers { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; diff --git a/scripts/InitialDeployments.s.sol b/scripts/InitialDeployments.s.sol index c0c10e9..7e4cf7a 100644 --- a/scripts/InitialDeployments.s.sol +++ b/scripts/InitialDeployments.s.sol @@ -22,9 +22,9 @@ abstract contract BaseInitialDeployment is GovBaseScript { function _execute( GovDeployerHelpers.Addresses memory addresses ) internal override { -// addresses.create3Factory = CREATE3_FACTORY() == address(0) -// ? address(new Create3Factory{salt: Constants.CREATE3_FACTORY_SALT}()) -// : CREATE3_FACTORY(); + addresses.create3Factory = CREATE3_FACTORY() == address(0) + ? address(new Create3Factory{salt: Constants.CREATE3_FACTORY_SALT}()) + : CREATE3_FACTORY(); addresses.chainId = TRANSACTION_NETWORK(); addresses.owner = OWNER(); addresses.guardian = GUARDIAN(); @@ -92,9 +92,9 @@ contract Metis is BaseInitialDeployment { } contract Binance is BaseInitialDeployment { - function GUARDIAN() public pure override returns (address) { - return 0xF6Db48C5968A9eBCB935786435530f28e32Cc501; - } + function GUARDIAN() public pure override returns (address) { + return 0xF6Db48C5968A9eBCB935786435530f28e32Cc501; + } function TRANSACTION_NETWORK() public pure override returns (uint256) { return ChainIds.BNB; @@ -122,15 +122,25 @@ contract Gnosis is BaseInitialDeployment { } contract Zkevm is BaseInitialDeployment { -// function GUARDIAN() public pure override returns (address) { -// return 0xF163b8698821cefbD33Cf449764d69Ea445cE23D; -// } + function GUARDIAN() public pure override returns (address) { + return 0x8C05474F1f0161F71276677De0a2d8a347583c45; + } function TRANSACTION_NETWORK() public pure override returns (uint256) { return ChainIds.POLYGON_ZK_EVM; } } +contract Scroll is BaseInitialDeployment { + // function GUARDIAN() public pure override returns (address) { + // return ; + // } + + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.SCROLL; + } +} + contract Ethereum_testnet is BaseInitialDeployment { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; diff --git a/scripts/Payloads/Deploy_ExecutorLvl1.s.sol b/scripts/Payloads/Deploy_ExecutorLvl1.s.sol index 515dd84..a79e603 100644 --- a/scripts/Payloads/Deploy_ExecutorLvl1.s.sol +++ b/scripts/Payloads/Deploy_ExecutorLvl1.s.sol @@ -94,6 +94,12 @@ contract Zkevm is BaseDeployExecutorLvl1 { } } +contract Scroll is BaseDeployExecutorLvl1 { + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.SCROLL; + } +} + contract Ethereum_testnet is BaseDeployExecutorLvl1 { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; diff --git a/scripts/Payloads/Deploy_PayloadsController.s.sol b/scripts/Payloads/Deploy_PayloadsController.s.sol index 66008b5..8818915 100644 --- a/scripts/Payloads/Deploy_PayloadsController.s.sol +++ b/scripts/Payloads/Deploy_PayloadsController.s.sol @@ -239,6 +239,16 @@ contract Zkevm is BaseDeployPayloadsController { } } +contract Scroll is BaseDeployPayloadsController { + function TRANSACTION_NETWORK() public pure override returns (uint256) { + return ChainIds.SCROLL; + } + + function GOVERNANCE_NETWORK() public pure override returns (uint256) { + return ChainIds.ETHEREUM; + } +} + contract Ethereum_testnet is BaseDeployPayloadsController { function TRANSACTION_NETWORK() public pure override returns (uint256) { return TestNetChainIds.ETHEREUM_SEPOLIA; From 64b9897ec2ca660a9932f9d27098f093df93e819 Mon Sep 17 00:00:00 2001 From: sendra Date: Fri, 5 Jan 2024 16:35:10 +0100 Subject: [PATCH 6/8] fix: update a.DI lib with scroll and zkevm --- lib/aave-address-book | 2 +- lib/aave-delivery-infrastructure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/aave-address-book b/lib/aave-address-book index ee8a24e..a53910d 160000 --- a/lib/aave-address-book +++ b/lib/aave-address-book @@ -1 +1 @@ -Subproject commit ee8a24e7799574386224853ad4bb15f3b470490f +Subproject commit a53910d9b71c6653f23d08443264ad898119b391 diff --git a/lib/aave-delivery-infrastructure b/lib/aave-delivery-infrastructure index 629aa8a..96623aa 160000 --- a/lib/aave-delivery-infrastructure +++ b/lib/aave-delivery-infrastructure @@ -1 +1 @@ -Subproject commit 629aa8a769f795da099558c4b47502f40df078d8 +Subproject commit 96623aa831d6756b7d58a4f55c54fe195c367776 From 2c585546114c70c3b10cc31701c9041d3e50ff07 Mon Sep 17 00:00:00 2001 From: sendra Date: Mon, 8 Jan 2024 10:47:06 +0100 Subject: [PATCH 7/8] fix: missing scroll path --- scripts/GovBaseScript.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/GovBaseScript.sol b/scripts/GovBaseScript.sol index 7641806..aceda32 100644 --- a/scripts/GovBaseScript.sol +++ b/scripts/GovBaseScript.sol @@ -66,6 +66,8 @@ library GovDeployerHelpers { return './deployments/gov/mainnet/gnosis.json'; } else if (chainId == ChainIds.POLYGON_ZK_EVM) { return './deployments/gov/mainnet/zkevm.json'; + } else if (chainId == ChainIds.SCROLL) { + return './deployments/gov/mainnet/zkevm.json'; } if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) { return './deployments/gov/testnet/sep.json'; @@ -89,6 +91,8 @@ library GovDeployerHelpers { return './deployments/gov/testnet/gnosis_chiado.json'; } else if (chainId == TestNetChainIds.POLYGON_ZK_EVM_GOERLI) { return './deployments/gov/testnet/zkevm_go.json'; + } else if (chainId == TestNetChainIds.SCROLL_SEPOLIA) { + return './deployments/gov/testnet/scroll_sepolia.json'; } else { revert('chain id is not supported'); } From 185908352e214ae3967c66206bd7c2b3475a7c53 Mon Sep 17 00:00:00 2001 From: sendra Date: Fri, 12 Jan 2024 11:11:47 +0100 Subject: [PATCH 8/8] fix: added scroll guardian --- scripts/InitialDeployments.s.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/InitialDeployments.s.sol b/scripts/InitialDeployments.s.sol index 7e4cf7a..c2eded0 100644 --- a/scripts/InitialDeployments.s.sol +++ b/scripts/InitialDeployments.s.sol @@ -132,9 +132,9 @@ contract Zkevm is BaseInitialDeployment { } contract Scroll is BaseInitialDeployment { - // function GUARDIAN() public pure override returns (address) { - // return ; - // } + function GUARDIAN() public pure override returns (address) { + return 0x63B20270b695E44Ac94Ad7592D5f81E3575b93e7; + } function TRANSACTION_NETWORK() public pure override returns (uint256) { return ChainIds.SCROLL;