generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: a.DI Ethereum -> Celo path activation
- Loading branch information
Showing
4 changed files
with
128 additions
and
1 deletion.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
src/20250109_AaveV3Ethereum_ADICeloPathActivation/ADICeloPathActivation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: "a.DI Celo path activation" | ||
author: "BGD Labs @bgdlabs" | ||
discussions: TODO | ||
snapshot: TODO | ||
--- | ||
|
||
## Simple Summary | ||
|
||
Proposal to register the necessary Celo adapters on a.DI, a technical pre-requirement for an activation vote of Aave v3 Celo. | ||
|
||
## Motivation | ||
|
||
In order to be able to pass messages from Ethereum to Celo via a.DI (Aave Delivery Infrastructure), it is necessary to at least have three valid adapters Ethereum → Celo smart contracts enabled in the system. | ||
|
||
The first case of message passing Ethereum → Celo is the activation proposal for an Aave v3 Celo pool and consequently, to be able to execute on the Celo side the payload, the Aave governance should approve in advance the a.DI adapters smart contracts. | ||
|
||
This procedure mirrors the requirements on previous networks like Scroll or ZkSync. | ||
|
||
## Specification | ||
|
||
The proposal payload simply registers pre-deployed Celo adapters (with the necessary configurations to communicate with the Celo a.DI) on the Ethereum a.DI instance. | ||
|
||
This is done by calling the enableBridgeAdapters() function on the Ethereum Cross-chain Controller smart contract. | ||
|
||
| Network | Hyperlane Adapter | LayerZero Adapter | CCIP Adapter | | ||
| -------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | ||
| Ethereum | [0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1](https://etherscan.io/address/0x01dcb90Cf13b82Cde4A0BAcC655585a83Af3cCC1) | [0x8410d9BD353b420ebA8C48ff1B0518426C280FCC](https://etherscan.io/address/0x8410d9BD353b420ebA8C48ff1B0518426C280FCC) | [0x58489B249BfBCF5ef4B30bdE2792086e83122B6f](https://etherscan.io/address/0x58489B249BfBCF5ef4B30bdE2792086e83122B6f) | | ||
| Celo | [0xa5cc218513305221201f196760E9e64e9D49d98A](https://celoscan.io/address/0xa5cc218513305221201f196760E9e64e9D49d98A) | [0xAE93BEa44dcbE52B625169588574d31e36fb3A67](https://celoscan.io/address/0xAE93BEa44dcbE52B625169588574d31e36fb3A67) | [0x3d534E8964e7aAcfc702751cc9A2BB6A9fe7d928](https://celoscan.io/address/0x3d534E8964e7aAcfc702751cc9A2BB6A9fe7d928) | | ||
|
||
The new a.DI deployments on Linea network are as follows: | ||
|
||
| Contract | Address | | ||
| -------------------- | -------------------------------------------------------------------------------------------------------------------- | | ||
| CrossChainController | [0x50F4dAA86F3c747ce15C3C38bD0383200B61d6Dd](https://celoscan.io/address/0x50F4dAA86F3c747ce15C3C38bD0383200B61d6Dd) | | ||
| Granular Guardian | [0xbE815420A63A413BB8D508d8022C0FF150Ea7C39](https://celoscan.io/address/0xbE815420A63A413BB8D508d8022C0FF150Ea7C39) | | ||
|
||
The new Aave Governance deployments on Linea network are as follows: | ||
|
||
| Contract | Address | | ||
| ------------------- | -------------------------------------------------------------------------------------------------------------------- | | ||
| PayloadsController | [0xE48E10834C04E394A04BF22a565D063D40b9FA42](https://celoscan.io/address/0xE48E10834C04E394A04BF22a565D063D40b9FA42) | | ||
| Executor Lvl 1 | [0x1dF462e2712496373A347f8ad10802a5E95f053D](https://celoscan.io/address/0x1dF462e2712496373A347f8ad10802a5E95f053D) | | ||
| Governance Guardian | [0x056E4C4E80D1D14a637ccbD0412CDAAEc5B51F4E](https://celoscan.io/address/0x056E4C4E80D1D14a637ccbD0412CDAAEc5B51F4E) | | ||
| BGD Labs Guardian | [0xfD3a6E65e470a7D7D730FFD5D36a9354E8F9F4Ea](https://celoscan.io/address/0xfD3a6E65e470a7D7D730FFD5D36a9354E8F9F4Ea) | | ||
|
||
## References | ||
|
||
- Adapter Implementations: [HyperLane Bridge Adapters](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/1f1c46af4dd914847849cad4fdd2d26525278821/src/contracts/adapters/hyperLane/HyperLaneAdapter.sol), [LayerZero Bridge Adapters](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/1f1c46af4dd914847849cad4fdd2d26525278821/src/contracts/adapters/layerZero/LayerZeroAdapter.sol), [CCIP Bridge Adapters](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/1f1c46af4dd914847849cad4fdd2d26525278821/src/contracts/adapters/ccip/CCIPAdapter.sol) | ||
- Payload Implementation: [Payload](https://github.com/bgd-labs/adi-deploy/blob/d4990ac90bdb5e4ad39a44cf9ca4d53fb2974c97/src/adapter_payloads/Ethereum_Celo_Path_Payload.sol) | ||
- Payload Tests: [tests](https://github.com/bgd-labs/adi-deploy/blob/d4990ac90bdb5e4ad39a44cf9ca4d53fb2974c97/tests/payloads/ethereum/AddCeloPathTest.t.sol) | ||
- Diffs: [a.DI diffs](https://github.com/bgd-labs/adi-deploy/blob/d4990ac90bdb5e4ad39a44cf9ca4d53fb2974c97/diffs/adi_add_celo_path_to_adiethereum_before_adi_add_celo_path_to_adiethereum_after.md) | ||
- Snapshot: Direct-to-AIP | ||
- [Discussion]() | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
55 changes: 55 additions & 0 deletions
55
src/20250109_AaveV3Ethereum_ADICeloPathActivation/ADICeloPathActivation_20250109.s.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol'; | ||
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; | ||
import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol'; | ||
|
||
address constant PAYLOAD = address(0xE11a04e56f650fe78411F763ca15D7936a57fe5c); | ||
|
||
/** | ||
* @dev Deploy Ethereum | ||
* deploy-command: make deploy-ledger contract=src/20250109_AaveV3Ethereum_ADICeloPathActivation/ADICeloPathActivation_20250109.s.sol:DeployEthereum chain=mainnet | ||
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/ADICeloPathActivation_20250109.s.sol/1/run-latest.json | ||
*/ | ||
contract DeployEthereum is EthereumScript { | ||
function run() external broadcast { | ||
// compose action | ||
IPayloadsControllerCore.ExecutionAction[] | ||
memory actions = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actions[0] = GovV3Helpers.buildAction(PAYLOAD); | ||
|
||
// register action at payloadsController | ||
GovV3Helpers.createPayload(actions); | ||
} | ||
} | ||
|
||
/** | ||
* @dev Create Proposal | ||
* command: make deploy-ledger contract=src/20250109_AaveV3Ethereum_ADICeloPathActivation/ADICeloPathActivation_20250109.s.sol:CreateProposal chain=mainnet | ||
*/ | ||
contract CreateProposal is EthereumScript { | ||
function run() external { | ||
// create payloads | ||
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); | ||
|
||
// compose actions for validation | ||
IPayloadsControllerCore.ExecutionAction[] | ||
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actionsEthereum[0] = GovV3Helpers.buildAction(PAYLOAD); | ||
|
||
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal( | ||
vm, | ||
payloads, | ||
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20250109_AaveV3Ethereum_ADICeloPathActivation/ADICeloPathActivation.md' | ||
) | ||
); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/20250109_AaveV3Ethereum_ADICeloPathActivation/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {ConfigFile} from '../../generator/types'; | ||
export const config: ConfigFile = { | ||
rootOptions: { | ||
author: 'BGD Labs @bgdlabs', | ||
pools: ['AaveV3Ethereum'], | ||
title: 'a.DI Celo path activation', | ||
shortName: 'ADICeloPathActivation', | ||
date: '20250109', | ||
discussion: '', | ||
snapshot: '', | ||
votingNetwork: 'POLYGON', | ||
}, | ||
poolOptions: {AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 21586565}}}, | ||
}; |