Skip to content

Commit

Permalink
Merge pull request #8 from bgd-labs/feat/zkevm
Browse files Browse the repository at this point in the history
feat: ZkEVM and Scroll Deployments and scripts
  • Loading branch information
sendra authored Jan 15, 2024
2 parents fc4857f + 1859083 commit 0c14d60
Show file tree
Hide file tree
Showing 22 changed files with 298 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ 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
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=
Expand All @@ -34,3 +38,5 @@ ETHERSCAN_API_KEY_ARBITRUM=
ETHERSCAN_API_KEY_BINANCE=
ETHERSCAN_API_KEY_BASE=
ETHERSCAN_API_KEY_GNOSIS=
ETHERSCAN_API_KEY_ZKEVM=
ETHERSCAN_API_KEY_SCROLL=
25 changes: 25 additions & 0 deletions deployments/cc/mainnet/pre_prod_eth.json
Original file line number Diff line number Diff line change
@@ -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"
}
25 changes: 25 additions & 0 deletions deployments/cc/mainnet/pre_prod_scroll.json
Original file line number Diff line number Diff line change
@@ -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"
}
25 changes: 25 additions & 0 deletions deployments/cc/mainnet/scroll.json
Original file line number Diff line number Diff line change
@@ -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"
}
24 changes: 24 additions & 0 deletions deployments/cc/mainnet/zkevm.json
Original file line number Diff line number Diff line change
@@ -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"
}
26 changes: 26 additions & 0 deletions deployments/gov/mainnet/pre_prod_eth.json
Original file line number Diff line number Diff line change
@@ -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"
}
26 changes: 26 additions & 0 deletions deployments/gov/mainnet/pre_prod_scroll.json
Original file line number Diff line number Diff line change
@@ -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"
}
26 changes: 26 additions & 0 deletions deployments/gov/mainnet/scroll.json
Original file line number Diff line number Diff line change
@@ -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"
}
25 changes: 25 additions & 0 deletions deployments/gov/mainnet/zkevm.json
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 8 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ base="${RPC_BASE}"
base-testnet="${RPC_BASE_TESTNET}"
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 }
Expand All @@ -54,6 +58,10 @@ 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}
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/'}



Expand Down
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 104 files
2 changes: 1 addition & 1 deletion lib/aave-delivery-infrastructure
2 changes: 1 addition & 1 deletion lib/solidity-utils
12 changes: 12 additions & 0 deletions scripts/Deploy_ContractHelpers.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ contract Gnosis is BaseContractHelpers {
}
}

contract Zkevm is BaseContractHelpers {
function TRANSACTION_NETWORK() public pure override returns (uint256) {
return ChainIds.POLYGON_ZK_EVM;
}
}

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;
Expand Down
8 changes: 8 additions & 0 deletions scripts/GovBaseScript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ 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';
} else if (chainId == ChainIds.SCROLL) {
return './deployments/gov/mainnet/zkevm.json';
}
if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) {
return './deployments/gov/testnet/sep.json';
Expand All @@ -85,6 +89,10 @@ 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 if (chainId == TestNetChainIds.SCROLL_SEPOLIA) {
return './deployments/gov/testnet/scroll_sepolia.json';
} else {
revert('chain id is not supported');
}
Expand Down
26 changes: 23 additions & 3 deletions scripts/InitialDeployments.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -121,6 +121,26 @@ contract Gnosis is BaseInitialDeployment {
}
}

contract Zkevm is BaseInitialDeployment {
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 0x63B20270b695E44Ac94Ad7592D5f81E3575b93e7;
}

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;
Expand Down
12 changes: 12 additions & 0 deletions scripts/Payloads/Deploy_ExecutorLvl1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ contract Gnosis is BaseDeployExecutorLvl1 {
}
}

contract Zkevm is BaseDeployExecutorLvl1 {
function TRANSACTION_NETWORK() public pure override returns (uint256) {
return ChainIds.POLYGON_ZK_EVM;
}
}

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;
Expand Down
20 changes: 20 additions & 0 deletions scripts/Payloads/Deploy_PayloadsController.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,26 @@ 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 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;
Expand Down
Loading

0 comments on commit 0c14d60

Please sign in to comment.