Skip to content

Commit

Permalink
Merge remote-tracking branch 'bgd/fix/fix-ci' into certora
Browse files Browse the repository at this point in the history
  • Loading branch information
nisnislevi committed Nov 26, 2024
2 parents 212d62b + cbc4e58 commit d135939
Show file tree
Hide file tree
Showing 54 changed files with 733 additions and 79 deletions.
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ 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
RPC_ZK_SYNC=https://mainnet.era.zksync.io
RPC_ZK_SYNC_TESTNET=https://sepolia.era.zksync.dev

# Etherscan api keys for verification & download utils
ETHERSCAN_API_KEY_MAINNET=
Expand All @@ -34,3 +40,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=
20 changes: 20 additions & 0 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Comment

on:
workflow_run:
workflows: [Test]
types:
- completed

permissions:
actions: read
issues: write
checks: read
statuses: read
pull-requests: write

jobs:
comment:
uses: bgd-labs/github-workflows/.github/workflows/comment.yml@main
secrets:
READ_ONLY_PAT: ${{ secrets.READ_ONLY_PAT }}
12 changes: 0 additions & 12 deletions .github/workflows/main.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
push:
branches:
- main

jobs:
test:
name: Foundry build n test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: bgd-labs/action-rpc-env@main
with:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

# we simply use foundry zk for all jobs in this repo
- name: Run Foundry setup
uses: bgd-labs/github-workflows/.github/actions/foundry-setup@main

- name: Run Forge tests
id: test
uses: bgd-labs/github-workflows/.github/actions/foundry-test@main

- name: Run Gas report
uses: bgd-labs/github-workflows/.github/actions/foundry-gas-report@main

- name: Run Lcov report
uses: bgd-labs/github-workflows/.github/actions/foundry-lcov-report@main

- name: Run Forge tests
uses: bgd-labs/github-workflows/.github/actions/comment-artifact@main

# we let failing tests pass so we can log them in the comment, still we want the ci to fail
- name: Post test
if: ${{ steps.test.outputs.testStatus != 0 }}
run: |
echo "tests failed"
exit 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
broadcast/
.DS_Store
/input.json
zkout/
2 changes: 2 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[submodule "lib/solidity-utils"]
path = lib/solidity-utils
url = https://github.com/bgd-labs/solidity-utils
branch = feat/zksync
[submodule "lib/aave-token-v3"]
path = lib/aave-token-v3
url = https://github.com/bgd-labs/aave-token-v3
Expand All @@ -17,3 +18,4 @@
[submodule "lib/aave-delivery-infrastructure"]
path = lib/aave-delivery-infrastructure
url = https://github.com/bgd-labs/aave-delivery-infrastructure
branch = feat/zksync
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ custom_polygon-testnet := --with-gas-price 20000000000 # 5 gwei
custom_avalanche := --with-gas-price 27000000000 # 27 gwei
custom_metis-testnet := --legacy --verifier-url https://goerli.explorer.metisdevops.link/api/
custom_metis := --verifier-url https://andromeda-explorer.metis.io/api/

custom_zksync := --zksync
custom_zksync-testnet := --legacy --zksync

# params:
# 1 - path/file_name
Expand Down Expand Up @@ -99,7 +100,7 @@ write-json-addresses :; forge script scripts/WriteAddresses.s.sol:WriteDeployedA


deploy-initial-test:
$(call deploy_fn,InitialDeployments,gnosis)
$(call deploy_fn,InitialDeployments,zksync)

# Deploy Governance contracts
deploy-governance-test:
Expand All @@ -123,14 +124,14 @@ set-vm-as-ccf-sender-test:
$(call deploy_fn,VotingMachine/Set_VM_as_CCF_Sender,ethereum avalanche polygon binance)

deploy-executor-lvl1-test:
$(call deploy_fn,Payloads/Deploy_ExecutorLvl1,ethereum avalanche polygon binance)
$(call deploy_fn,Payloads/Deploy_ExecutorLvl1,zksync)

deploy-executor-lvl2-test:
$(call deploy_fn,Payloads/Deploy_ExecutorLvl2,ethereum)

## Deploy execution chain contracts
deploy-payloads-controller-chain-test:
$(call deploy_fn,Payloads/Deploy_PayloadsController,gnosis)
$(call deploy_fn,Payloads/Deploy_PayloadsController,zksync)

## Deploy Governance Voting Portal
deploy-voting-portals-test:
Expand All @@ -147,7 +148,7 @@ set-vp-as_ccf-senders-test:

## Deploy Contract Helpers
deploy-helper-contracts-test:
$(call deploy_fn,Deploy_ContractHelpers,gnosis)
$(call deploy_fn,Deploy_ContractHelpers,zksync)

deploy-full-key-test:
make deploy-initial-test
Expand Down Expand Up @@ -217,10 +218,10 @@ update-voting-config:
$(call deploy_fn,helpers/GovernanceSetVotingConfig,ethereum)

deploy-payload:
$(call deploy_fn,helpers/CreatePayload,polygon)
$(call deploy_fn,helpers/CreatePayload,zksync)

register-payload:
$(call deploy_fn,helpers/RegisterPayload,polygon)
$(call deploy_fn,helpers/RegisterPayload,zksync)

create-proposal:
$(call deploy_fn,helpers/CreateProposal,ethereum)
Expand Down
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"
}
27 changes: 27 additions & 0 deletions deployments/cc/mainnet/pre_prod_zksync.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"arbAdapter": "0x0000000000000000000000000000000000000000",
"baseAdapter": "0x0000000000000000000000000000000000000000",
"ccipAdapter": "0x0000000000000000000000000000000000000000",
"chainId": 324,
"clEmergencyOracle": "0x0000000000000000000000000000000000000000",
"create3Factory": "0x0000000000000000000000000000000000000000",
"crossChainController": "0xEFB85c47F666829e9dD9Ad56fC2ca0E5C2569e17",
"crossChainControllerImpl": "0x93aF5EA45d7eDCD37EFd601C943592b71A2F3682",
"emergencyRegistry": "0x0000000000000000000000000000000000000000",
"gnosisAdapter": "0x0000000000000000000000000000000000000000",
"guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6",
"hlAdapter": "0x0000000000000000000000000000000000000000",
"lzAdapter": "0x0000000000000000000000000000000000000000",
"metisAdapter": "0x0000000000000000000000000000000000000000",
"mockDestination": "0x63Ba24d305dCBEd249E9808e4855387bd62424Cc",
"opAdapter": "0x0000000000000000000000000000000000000000",
"owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6",
"polAdapter": "0x0000000000000000000000000000000000000000",
"proxyAdmin": "0xb4b3048fD1a6e2e488b51A8a831181D528B9C5c5",
"proxyFactory": "0x8Ef21C75Ce360078cAD162565ED0c27617eCccE0",
"sameChainAdapter": "0x0000000000000000000000000000000000000000",
"scrollAdapter": "0x0000000000000000000000000000000000000000",
"wormholeAdapter": "0x0000000000000000000000000000000000000000",
"zkevmAdapter": "0x0000000000000000000000000000000000000000",
"zksyncAdapter": "0x53Cc59f9F3F4093ecBd2E9e366B35056022eCc8B"
}
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"
}
27 changes: 27 additions & 0 deletions deployments/cc/mainnet/zksync.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"arbAdapter": "0x0000000000000000000000000000000000000000",
"baseAdapter": "0x0000000000000000000000000000000000000000",
"ccipAdapter": "0x0000000000000000000000000000000000000000",
"chainId": 324,
"clEmergencyOracle": "0x0000000000000000000000000000000000000000",
"create3Factory": "0x0000000000000000000000000000000000000000",
"crossChainController": "0x800813f4714BC7A0a95310e3fB9e4f18872CA92C",
"crossChainControllerImpl": "0x2b6D63bf3e0abC405C50e00A015c4EE47780a42f",
"emergencyRegistry": "0x0000000000000000000000000000000000000000",
"gnosisAdapter": "0x0000000000000000000000000000000000000000",
"guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6",
"hlAdapter": "0x0000000000000000000000000000000000000000",
"lzAdapter": "0x0000000000000000000000000000000000000000",
"metisAdapter": "0x0000000000000000000000000000000000000000",
"mockDestination": "0x0000000000000000000000000000000000000000",
"opAdapter": "0x0000000000000000000000000000000000000000",
"owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6",
"polAdapter": "0x0000000000000000000000000000000000000000",
"proxyAdmin": "0x158d6c497317367CEa3CBAb0BD84E6de236F060D",
"proxyFactory": "0x8Ef21C75Ce360078cAD162565ED0c27617eCccE0",
"sameChainAdapter": "0x0000000000000000000000000000000000000000",
"scrollAdapter": "0x0000000000000000000000000000000000000000",
"wormholeAdapter": "0x0000000000000000000000000000000000000000",
"zkevmAdapter": "0x0000000000000000000000000000000000000000",
"zksyncAdapter": "0x1BC5C10CAe378fDbd7D52ec4F9f34590a619c68E"
}
27 changes: 27 additions & 0 deletions deployments/cc/testnet/zksync_sep.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"arbAdapter": "0x0000000000000000000000000000000000000000",
"baseAdapter": "0x0000000000000000000000000000000000000000",
"ccipAdapter": "0x0000000000000000000000000000000000000000",
"chainId": 300,
"clEmergencyOracle": "0x0000000000000000000000000000000000000000",
"create3Factory": "0x0000000000000000000000000000000000000000",
"crossChainController": "0x77430FCd47F62A9706CAca6300563c6B27885F5F",
"crossChainControllerImpl": "0xb8e9DFC71C1d232db103E7ae72bF0CF70c03F912",
"emergencyRegistry": "0x0000000000000000000000000000000000000000",
"gnosisAdapter": "0x0000000000000000000000000000000000000000",
"guardian": "0x6D603081563784dB3f83ef1F65Cc389D94365Ac9",
"hlAdapter": "0x0000000000000000000000000000000000000000",
"lzAdapter": "0x0000000000000000000000000000000000000000",
"metisAdapter": "0x0000000000000000000000000000000000000000",
"mockDestination": "0x3676a657F22Ea4A6Eb3A51Da7233A37E8D604967",
"opAdapter": "0x0000000000000000000000000000000000000000",
"owner": "0x6D603081563784dB3f83ef1F65Cc389D94365Ac9",
"polAdapter": "0x0000000000000000000000000000000000000000",
"proxyAdmin": "0x91123BA04bEDd58195C985B28F1F99d4a15E1910",
"proxyFactory": "0xcd1416eA758CFf55b7aBA279632446A4272800AB",
"sameChainAdapter": "0x0000000000000000000000000000000000000000",
"scrollAdapter": "0x0000000000000000000000000000000000000000",
"wormholeAdapter": "0x0000000000000000000000000000000000000000",
"zkevmAdapter": "0x0000000000000000000000000000000000000000",
"zksyncAdapter": "0x013D88537bFdb7984700D44a8c0427D13d352D90"
}
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": "0xac55366fE98D068C8dEeA1b82f3697AA7bacA056",
"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"
}
Loading

0 comments on commit d135939

Please sign in to comment.