generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: aDI Mantle path activation #609
Open
sendra
wants to merge
1
commit into
main
Choose a base branch
from
feat/Mantle-aDI-path-activation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+128
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
src/20250212_AaveV3Ethereum_MantleADIPathActivation/MantleADIPathActivation.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,60 @@ | ||
--- | ||
title: "Mantle a.DI path activation" | ||
author: "BGD Labs @bgdlabs" | ||
discussions: TODO | ||
snapshot: TODO | ||
--- | ||
|
||
## Simple Summary | ||
|
||
Proposal to register the necessary Mantle adapters on a.DI, a technical pre-requirement for an activation vote of Aave v3 Mantle. | ||
|
||
## Motivation | ||
|
||
In order to be able to pass messages from Ethereum to Mantle via a.DI (Aave Delivery Infrastructure), it is necessary to at least have three valid adapters Ethereum → Mantle smart contracts enabled in the system. | ||
|
||
The first case of message passing Ethereum → Mantle is the activation proposal for an Aave v3 Mantle pool and consequently, to be able to execute on the Mantle 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 ZkSync or Linea. | ||
|
||
## Specification | ||
|
||
The proposal payload simply registers pre-deployed Mantle adapters (with the necessary configurations to communicate with the Mantle a.DI) on the Ethereum a.DI instance. | ||
|
||
This is done by calling the enableBridgeAdapters() function on the Ethereum Cross-chain Controller smart contract. | ||
|
||
The following are the configured adapters for the Ethereum → Mantle path. The required confirmations on the path are 1 out of 1. | ||
|
||
| Network | Mantle Native Adapter | | ||
| -------- | ----------------------------------------------------------------------------------------------------------------------- | | ||
| Ethereum | [0xb66FA987fa7975Cac3d12B629c9c44e459e50990](https://etherscan.io/address/0xb66FA987fa7975Cac3d12B629c9c44e459e50990) | | ||
| Mantle | [0x4E740ac02b866b429738a9e225e92A15F4452521](https://mantlescan.xyz/address/0x4E740ac02b866b429738a9e225e92A15F4452521) | | ||
|
||
The new a.DI deployments on Mantle network are as follows: | ||
|
||
| Contract | Address | | ||
| -------------------- | ----------------------------------------------------------------------------------------------------------------------- | | ||
| CrossChainController | [0x1283C5015B1Fb5616FA3aCb0C18e6879a02869cB](https://mantlescan.xyz/address/0x1283C5015B1Fb5616FA3aCb0C18e6879a02869cB) | | ||
| Granular Guardian | [0xb26670d2800DBB9cfCe2f2660FfDcA48C799c86d](https://mantlescan.xyz/address/0xb26670d2800DBB9cfCe2f2660FfDcA48C799c86d) | | ||
|
||
The new Aave Governance deployments on Mantle network are as follows: | ||
|
||
| Contract | Address | | ||
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- | | ||
| PayloadsController | [0xF089f77173A3009A98c45f49D547BF714A7B1e01](https://mantlescan.xyz/address/0xF089f77173A3009A98c45f49D547BF714A7B1e01) | | ||
| Executor Lvl 1 | [0x70884634D0098782592111A2A6B8d223be31CB7b](https://mantlescan.xyz/address/0x70884634D0098782592111A2A6B8d223be31CB7b) | | ||
| Governance Guardian | [0x14816fC7f443A9C834d30eeA64daD20C4f56fBCD](https://mantlescan.xyz/address/0x14816fC7f443A9C834d30eeA64daD20C4f56fBCD) | | ||
| BGD Labs Guardian | [0x0686f59Cc2aEc1ccf891472Dc6C89bB747F6a4A7](https://mantlescan.xyz/address/0x0686f59Cc2aEc1ccf891472Dc6C89bB747F6a4A7) | | ||
|
||
## References | ||
|
||
- Adapter Implementations: [Mantle Native Adapters](https://github.com/bgd-labs/aave-delivery-infrastructure/blob/9a79f7986b5442657f64e41a0ab089e0cdb71e98/src/contracts/adapters/mantle/MantleAdapter.sol) | ||
- Payload Implementation: [Payload](https://github.com/bgd-labs/adi-deploy/blob/54a363eb2d435782f6107ed3bef4fdbec6ff52c1/scripts/payloads/adapters/ethereum/Ethereum_Activate_Mantle_Bridge_Adapter_Payload.s.sol) | ||
- Payload Tests: [tests](https://github.com/bgd-labs/adi-deploy/blob/54a363eb2d435782f6107ed3bef4fdbec6ff52c1/tests/payloads/ethereum/AddMantlePathTest.t.sol) | ||
- Diffs: [a.DI diffs](https://github.com/bgd-labs/adi-deploy/blob/54a363eb2d435782f6107ed3bef4fdbec6ff52c1/diffs/adi_add_mantle_path_to_adiethereum_before_adi_add_mantle_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/). |
54 changes: 54 additions & 0 deletions
54
src/20250212_AaveV3Ethereum_MantleADIPathActivation/MantleADIPathActivation_20250212.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,54 @@ | ||
// 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(0x184CA99Cd89313c00a69b9A8E1649D84FBD8D86D); | ||
|
||
/** | ||
* @dev Deploy Ethereum | ||
* deploy-command: make deploy-ledger contract=src/20250212_AaveV3Ethereum_MantleADIPathActivation/MantleADIPathActivation_20250212.s.sol:DeployEthereum chain=mainnet | ||
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/MantleADIPathActivation_20250212.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/20250212_AaveV3Ethereum_MantleADIPathActivation/MantleADIPathActivation_20250212.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/20250212_AaveV3Ethereum_MantleADIPathActivation/MantleADIPathActivation.md' | ||
) | ||
); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/20250212_AaveV3Ethereum_MantleADIPathActivation/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: 'Mantle a.DI path activation', | ||
shortName: 'MantleADIPathActivation', | ||
date: '20250212', | ||
discussion: '', | ||
snapshot: '', | ||
votingNetwork: 'POLYGON', | ||
}, | ||
poolOptions: {AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 21830270}}}, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think can be removed as it is a maintainance proposal