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.
- Loading branch information
Showing
3 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
src/20241212_AaveV3Ethereum_ADILineaPathActivation/ADILineaPathActivation.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,59 @@ | ||
--- | ||
title: "a.DI Linea path activation" | ||
author: "BGD Labs @bgdlabs" | ||
discussions: TODO | ||
snapshot: TODO | ||
--- | ||
|
||
## Simple Summary | ||
|
||
Proposal to register the necessary Liena adapters on a.DI, a technical pre-requirement for an activation vote of Aave v3 Linea. | ||
|
||
## Motivation | ||
|
||
In order to be able to pass messages from Ethereum to Linea via a.DI (Aave Delivery Infrastructure), it is necessary to at least have one valid adapter Ethereum → Linea smart contract enabled in the system. | ||
|
||
The first case of message passing Ethereum → Linea is the activation proposal for an Aave v3 Linea pool and consequently, to be able to execute on the Linea side the payload, the Aave governance should approve in advance the a.DI adapter smart contract. | ||
|
||
This procedure mirrors the requirements on previous networks like Scroll or ZkSync. | ||
|
||
## Specification | ||
|
||
The proposal payload simply registers a pre-deployed Linea adapter (with the necessary configurations to communicate with the Linea 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 | Linea Adapter | | ||
| -------- | ------------------------------------------------------------------------------------------------------------------------ | | ||
| Ethereum | [0x8097555ffDa4176C93FEf92dF473b9763e467686](https://etherscan.io/address/0x8097555ffDa4176C93FEf92dF473b9763e467686) | | ||
| Linea | [0xB3332d31ECFC3ef3BF6Cda79833D11d1A53f5cE6](https://lineascan.build/address/0xB3332d31ECFC3ef3BF6Cda79833D11d1A53f5cE6) | | ||
|
||
The new a.DI deployments on Linea network are as follows: | ||
|
||
| Contract | Address | | ||
| -------------------- | --------------------------------------------------------------------------------------------------------------------------- | | ||
| CrossChainController | [0x0D3f821e9741C8a8Bcac231162320251Db0cdf52](https://era.zksync.network/address/0x0D3f821e9741C8a8Bcac231162320251Db0cdf52) | | ||
| Granular Guardian | [0x8CAdaAE6cd278c7C8FBaD5d6F55Ca6129A627E10](https://lineascan.build/address/0x8CAdaAE6cd278c7C8FBaD5d6F55Ca6129A627E10) | | ||
|
||
The new Aave Governance deployments on Linea network are as follows: | ||
|
||
| Contract | Address | | ||
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ | | ||
| PayloadsController | [0x61308f66DEF56EffFa25C8CB5408D6dDdB450149](https://lineascan.build/address/0x61308f66DEF56EffFa25C8CB5408D6dDdB450149) | | ||
| Executor Lvl 1 | [0x8c2d95FE7aeB57b86961F3abB296A54f0ADb7F88](https://lineascan.build/address/0x8c2d95FE7aeB57b86961F3abB296A54f0ADb7F88) | | ||
| Governance Guardian | [0x0BF186764D8333a938f35e5dD124a7b9b9dccDF9](https://lineascan.build/address/0x0BF186764D8333a938f35e5dD124a7b9b9dccDF9) | | ||
| BGD Labs Guardian | [0xfD3a6E65e470a7D7D730FFD5D36a9354E8F9F4Ea](https://lineascan.build/address/0xfD3a6E65e470a7D7D730FFD5D36a9354E8F9F4Ea) | | ||
|
||
## References | ||
|
||
- Adapter Implementation: [Linea Bridge Adapter](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/239475f03956173abb5e09df31ed748f996c5944/src/contracts/adapters/linea/LineaAdapter.sol) | ||
- Payload Implementation: [Payload](https://github.com/bgd-labs/adi-deploy/blob/e75bde29ab3824fd7533d111651c8c108010723b/scripts/payloads/adapters/ethereum/Ethereum_Activate_Lina_Bridge_Adapter_Payload.s.sol) | ||
- Adapter Tests: [Linea Bridge Adapter tests](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/239475f03956173abb5e09df31ed748f996c5944/tests/adapters/LineaAdapter.t.sol) | ||
- Payload Tests: [tests](https://github.com/bgd-labs/adi-deploy/blob/e75bde29ab3824fd7533d111651c8c108010723b/tests/payloads/ethereum/AddLineaPathTest.t.sol) | ||
- Diffs: [a.DI diffs](https://github.com/bgd-labs/adi-deploy/commit/bf1b830150ec38138d6ffb39d287bc889054c65f#diff-7918ccb77189a37fc1206fa85d2b01945dc79e5f5224c8850018da970c556756) | ||
[Snapshot](TODO) | ||
- [Discussion](TODO) | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
58 changes: 58 additions & 0 deletions
58
src/20241212_AaveV3Ethereum_ADILineaPathActivation/ADILineaPathActivation_20241212.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,58 @@ | ||
// 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'; | ||
import {AaveV3Ethereum_ADILineaPathActivation_20241212} from './AaveV3Ethereum_ADILineaPathActivation_20241212.sol'; | ||
|
||
/** | ||
* @dev Deploy Ethereum | ||
* deploy-command: make deploy-ledger contract=src/20241212_AaveV3Ethereum_ADILineaPathActivation/ADILineaPathActivation_20241212.s.sol:DeployEthereum chain=mainnet | ||
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/ADILineaPathActivation_20241212.s.sol/1/run-latest.json | ||
*/ | ||
contract DeployEthereum is EthereumScript { | ||
function run() external broadcast { | ||
// deploy payloads | ||
address payload0 = 0x3C2A076cD5ECbed55D8Fc0A341c14Fc808bA7fF7; | ||
|
||
// compose action | ||
IPayloadsControllerCore.ExecutionAction[] | ||
memory actions = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actions[0] = GovV3Helpers.buildAction(payload0); | ||
|
||
// register action at payloadsController | ||
GovV3Helpers.createPayload(actions); | ||
} | ||
} | ||
|
||
/** | ||
* @dev Create Proposal | ||
* command: make deploy-ledger contract=src/20241212_AaveV3Ethereum_ADILineaPathActivation/ADILineaPathActivation_20241212.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( | ||
type(AaveV3Ethereum_ADILineaPathActivation_20241212).creationCode | ||
); | ||
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal( | ||
vm, | ||
payloads, | ||
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20241212_AaveV3Ethereum_ADILineaPathActivation/ADILineaPathActivation.md' | ||
) | ||
); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/20241212_AaveV3Ethereum_ADILineaPathActivation/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 Linea path activation', | ||
shortName: 'ADILineaPathActivation', | ||
date: '20241212', | ||
discussion: '', | ||
snapshot: '', | ||
votingNetwork: 'POLYGON', | ||
}, | ||
poolOptions: {AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 21386353}}}, | ||
}; |