Skip to content

Commit 66fbf4a

Browse files
authored
Merge pull request #32 from bgd-labs/feat/deploy-celo
feat: redeploy celo contracts
2 parents 9092da4 + 70303d6 commit 66fbf4a

18 files changed

+335
-41
lines changed

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[submodule "lib/aave-delivery-infrastructure"]
22
path = lib/aave-delivery-infrastructure
33
url = https://github.com/bgd-labs/aave-delivery-infrastructure
4+
branch = feat/deploy-celo
45
[submodule "lib/aave-helpers"]
56
path = lib/aave-helpers
67
url = https://github.com/bgd-labs/aave-helpers

Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ BASE_KEY = --private-key ${PRIVATE_KEY}
1717

1818

1919

20-
custom_ethereum := --with-gas-price 20000000000 # 53 gwei
20+
custom_ethereum := --with-gas-price 12000000000 # 53 gwei
2121
#custom_polygon := --with-gas-price 190000000000 # 560 gwei
2222
#custom_avalanche := --with-gas-price 27000000000 # 27 gwei
2323
#custom_metis-testnet := --legacy --verifier-url https://goerli.explorer.metisdevops.link/api/
@@ -164,23 +164,23 @@ deploy-full:
164164

165165
# Deploy Proxy Factories on all networks
166166
deploy-proxy-factory-test:
167-
$(call deploy_fn,InitialDeployments,linea)
167+
$(call deploy_fn,InitialDeployments,celo)
168168

169169
# Deploy Cross Chain Infra on all networks
170170
deploy-cross-chain-infra-test:
171-
$(call deploy_fn,ccc/DeployCCC,linea)
171+
$(call deploy_fn,ccc/DeployCCC,celo)
172172

173173
## Deploy CCIP bridge adapters on all networks
174174
deploy-ccip-bridge-adapters-test:
175-
$(call deploy_fn,adapters/DeployCCIP,ethereum)
175+
$(call deploy_fn,adapters/DeployCCIPAdapter,ethereum)
176176

177177
## Deploy LayerZero bridge adapters on all networks
178178
deploy-lz-bridge-adapters-test:
179-
$(call deploy_fn,adapters/DeployLZ,ethereum)
179+
$(call deploy_fn,adapters/DeployLZ,celo)
180180

181181
## Deploy HyperLane bridge adapters on all networks
182182
deploy-hl-bridge-adapters-test:
183-
$(call deploy_fn,adapters/DeployHL,ethereum)
183+
$(call deploy_fn,adapters/DeployHL,celo)
184184

185185
## Deploy SameChain adapters on ethereum
186186
deploy-same-chain-adapters-test:
@@ -219,11 +219,11 @@ set-ccf-sender-adapters-test:
219219

220220
# Set the bridge adapters allowed to receive messages
221221
set-ccr-receiver-adapters-test:
222-
$(call deploy_fn,ccc/Set_CCR_Receivers_Adapters,linea)
222+
$(call deploy_fn,ccc/Set_CCR_Receivers_Adapters,celo)
223223

224224
# Sets the required confirmations
225225
set-ccr-confirmations-test:
226-
$(call deploy_fn,ccc/Set_CCR_Confirmations,linea)
226+
$(call deploy_fn,ccc/Set_CCR_Confirmations,celo)
227227

228228

229229
## Deploy and configure all contracts
@@ -245,7 +245,7 @@ deploy-full-test:
245245
# ----------------------------------------------------------------------------------------------------------------------
246246
# ----------------------------------------- HELPER SCRIPTS ---------------------------------------------------------
247247
remove-bridge-adapters:
248-
$(call deploy_fn,helpers/RemoveBridgeAdapters,ethereum)
248+
$(call deploy_fn,helpers/RemoveBridgeAdapters,celo)
249249

250250
send-direct-message:
251251
$(call deploy_fn,helpers/Send_Direct_CCMessage,ethereum)
@@ -266,7 +266,7 @@ send-message-via-adapter:
266266
$(call deploy_fn,helpers/Send_Message_Via_Adapter,ethereum)
267267

268268
deploy_ccc_granular_guardian:
269-
$(call deploy_fn,access_control/network_scripts/GranularGuardianNetworkDeploys,linea)
269+
$(call deploy_fn,access_control/network_scripts/GranularGuardianNetworkDeploys,celo)
270270

271271
deploy-ccc-revision-and-update:
272272
$(call deploy_fn,CCC/UpdateCCC,ethereum)
@@ -283,5 +283,8 @@ deploy-zksync-path-payload:
283283
deploy-linea-path-payload:
284284
$(call deploy_fn,payloads/adapters/ethereum/Network_Deployments,ethereum)
285285

286+
deploy-celo-path-payload:
287+
$(call deploy_fn,payloads/adapters/ethereum/Network_Deployments,ethereum)
288+
286289
update-owners-and-guardians:
287290
$(call deploy_fn,helpers/Update_Ownership,zksync)

deployments/celo.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"arbAdapter": "0x0000000000000000000000000000000000000000",
33
"baseAdapter": "0x0000000000000000000000000000000000000000",
4-
"ccipAdapter": "0x0000000000000000000000000000000000000000",
4+
"ccipAdapter": "0x3d534E8964e7aAcfc702751cc9A2BB6A9fe7d928",
55
"chainId": 42220,
66
"clEmergencyOracle": "0x91b21900E91CD302EBeD05E45D8f270ddAED944d",
77
"create3Factory": "0x0000000000000000000000000000000000000000",
8-
"crossChainController": "0x4A5f4b29C0407E5Feb323305e121f563c7bC4d79",
9-
"crossChainControllerImpl": "0xf41193E25408F652AF878c47E4401A01B5E4B682",
8+
"crossChainController": "0x50F4dAA86F3c747ce15C3C38bD0383200B61d6Dd",
9+
"crossChainControllerImpl": "0xB0f963f93bb14C9c7c9061939107989c726E144d",
1010
"emergencyRegistry": "0x0000000000000000000000000000000000000000",
1111
"gnosisAdapter": "0x0000000000000000000000000000000000000000",
12+
"granularCCCGuardian": "0xbE815420A63A413BB8D508d8022C0FF150Ea7C39",
1213
"guardian": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6",
13-
"granularCCCGuardian": "0x0000000000000000000000000000000000000000",
14-
"hlAdapter": "0xa5cc218513305221201f196760E9e64e9D49d98A",
14+
"hlAdapter": "0x7b065E68E70f346B18636Ab86779980287ec73e0",
1515
"lineaAdapter": "0x0000000000000000000000000000000000000000",
16-
"lzAdapter": "0xAE93BEa44dcbE52B625169588574d31e36fb3A67",
16+
"lzAdapter": "0x83BC62fbeA15B7Bfe11e8eEE57997afA5451f38C",
1717
"metisAdapter": "0x0000000000000000000000000000000000000000",
1818
"mockDestination": "0x0000000000000000000000000000000000000000",
1919
"opAdapter": "0x0000000000000000000000000000000000000000",
2020
"owner": "0xEAF6183bAb3eFD3bF856Ac5C058431C8592394d6",
2121
"polAdapter": "0x0000000000000000000000000000000000000000",
22-
"proxyAdmin": "0x01d678F1bbE148C96e7501F1Ac41661904F84F61",
23-
"proxyFactory": "0xb172a90A7C238969CE9B27cc19D13b60A91e7F00",
22+
"proxyAdmin": "0x54BDcc37c4143f944A3EE51C892a6cBDF305E7a0",
23+
"proxyFactory": "0xAe13e4DA0952f0B8fE04E21df53716fCF799a923",
2424
"sameChainAdapter": "0x0000000000000000000000000000000000000000",
2525
"scrollAdapter": "0x0000000000000000000000000000000000000000",
2626
"wormholeAdapter": "0x3F006299eC88985c18E6e885EeA29A49eC579882",
2727
"zkevmAdapter": "0x0000000000000000000000000000000000000000",
2828
"zksyncAdapter": "0x0000000000000000000000000000000000000000"
29-
}
29+
}

deployments/ethereum.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"arbAdapter": "0x88d6D01e08d3e64513b15fD46528dBbA7d755883",
33
"baseAdapter": "0xa5948b0ac79f72966dFFC5C13E44f6dfDD3D58A0",
4-
"ccipAdapter": "0xB7a6618df58626C3a122ABAFD6Ee63Af63f3Ef29",
4+
"ccipAdapter": "0x58489B249BfBCF5ef4B30bdE2792086e83122B6f",
55
"chainId": 1,
66
"clEmergencyOracle": "0x0000000000000000000000000000000000000000",
77
"create3Factory": "0xcc3C54B95f3f1867A43009B80ed4DD930E3cE2F7",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Raw diff
2+
3+
```json
4+
{
5+
"forwarderAdaptersByChain": {
6+
"42220": {
7+
"from": "",
8+
"to": {
9+
"0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1": "0x7b065E68E70f346B18636Ab86779980287ec73e0",
10+
"0x58489B249BfBCF5ef4B30bdE2792086e83122B6f": "0x3d534E8964e7aAcfc702751cc9A2BB6A9fe7d928",
11+
"0x8410d9BD353b420ebA8C48ff1B0518426C280FCC": "0x83BC62fbeA15B7Bfe11e8eEE57997afA5451f38C"
12+
}
13+
}
14+
}
15+
}
16+
```

foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fs_permissions = [{ access = "read-write", path = "./"}]
1010
metadata="none"
1111
solc = "0.8.20"
1212
ffi = true
13-
13+
evm_version = 'paris'
1414

1515
[profile.zksync.zksync]
1616
fallback_oz = true

lib/aave-helpers

scripts/access_control/network_scripts/GranularGuardianNetworkDeploys.s.sol

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,21 @@ contract Linea is DeployGranularGuardian {
238238
return ChainIds.LINEA;
239239
}
240240
}
241+
242+
contract Celo is DeployGranularGuardian {
243+
function DEFAULT_ADMIN() internal pure override returns (address) {
244+
return 0x1dF462e2712496373A347f8ad10802a5E95f053D; //GovernanceV3Celo.EXECUTOR_LVL_1;
245+
}
246+
247+
function RETRY_GUARDIAN() internal pure override returns (address) {
248+
return 0xfD3a6E65e470a7D7D730FFD5D36a9354E8F9F4Ea; // bgd guardian
249+
}
250+
251+
function SOLVE_EMERGENCY_GUARDIAN() internal pure override returns (address) {
252+
return 0x056E4C4E80D1D14a637ccbD0412CDAAEc5B51F4E; // dao governance guardian
253+
}
254+
255+
function TRANSACTION_NETWORK() internal pure override returns (uint256) {
256+
return ChainIds.CELO;
257+
}
258+
}

scripts/adapters/DeployCCIPAdapter.s.sol

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,26 @@ contract Binance_testnet is DeployCCIPAdapter {
214214
return remoteCCCByNetwork;
215215
}
216216
}
217+
218+
contract Celo is DeployCCIPAdapter {
219+
function CCIP_ROUTER() internal pure override returns (address) {
220+
return 0xfB48f15480926A4ADf9116Dca468bDd2EE6C5F62;
221+
}
222+
223+
function LINK_TOKEN() internal pure override returns (address) {
224+
return 0xd07294e6E917e07dfDcee882dd1e2565085C2ae0;
225+
}
226+
227+
function TRANSACTION_NETWORK() internal pure override returns (uint256) {
228+
return ChainIds.CELO;
229+
}
230+
231+
function REMOTE_CCC_BY_NETWORK() internal view override returns (RemoteCCC[] memory) {
232+
RemoteCCC[] memory remoteCCCByNetwork = new RemoteCCC[](1);
233+
remoteCCCByNetwork[0].chainId = ChainIds.ETHEREUM;
234+
remoteCCCByNetwork[0].crossChainController = _getAddresses(ChainIds.ETHEREUM)
235+
.crossChainController;
236+
237+
return remoteCCCByNetwork;
238+
}
239+
}

0 commit comments

Comments
 (0)